diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2001-12-23 23:25:19 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2001-12-23 23:25:19 +0000 |
commit | 787d633b98b304c23ca51cfe761e6581986c3bbc (patch) | |
tree | d8c7bd945fd887420b3fdcad4bdb04138d17a520 /net-misc/snort | |
parent | remove a dodir /etc/rc.d/, as it is no longer in use (diff) | |
download | historical-787d633b98b304c23ca51cfe761e6581986c3bbc.tar.gz historical-787d633b98b304c23ca51cfe761e6581986c3bbc.tar.bz2 historical-787d633b98b304c23ca51cfe761e6581986c3bbc.zip |
moved rc-script config settings to /etc/conf.d
Diffstat (limited to 'net-misc/snort')
-rw-r--r-- | net-misc/snort/files/snort | 47 | ||||
-rw-r--r-- | net-misc/snort/files/snort.confd | 33 | ||||
-rw-r--r-- | net-misc/snort/snort-1.7.ebuild | 83 |
3 files changed, 86 insertions, 77 deletions
diff --git a/net-misc/snort/files/snort b/net-misc/snort/files/snort index e2a246c23a17..df073fe23d47 100644 --- a/net-misc/snort/files/snort +++ b/net-misc/snort/files/snort @@ -1,59 +1,24 @@ #!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-misc/snort/files/snort,v 1.2 2001/12/06 20:17:02 azarah Exp $ -SERVICE=snort -opts="start stop restart" +# $Header: /var/cvsroot/gentoo-x86/net-misc/snort/files/snort,v 1.3 2001/12/23 23:25:19 azarah Exp $ -# Make sure this matches your IFACE -PIDFILE=/var/run/snort_eth0.pid -EXE=/usr/bin/snort +# NB: Config is in /etc/conf.d/snort -# comment out the next three lines after you've read them -einfo "Edit /etc/snort/snort.conf and /etc/init.d/snort" -exit 0; - -# Pick a mode options are -A - -#fast - fast alert mode, write the alert in a simple format with a -# timestamp, alert message, source and destination IPs/ports -# -# full - this is also the default alert mode, so if you specify nothing -# this will automatically be used -# -# unsock - send alerts to a UNIX socket that another program can listen on -# -# none - turn off alerting - -MODE="full" - -# Set this to the appropriate network you box lives on -NETWORK="192.168.1.1/24" - -# You probably don't want to change this, but in case you do -LOGDIR="/var/log/snort" - -# Probably not this either -CONF=/etc/snort/snort.conf -OPTS="-D -s -u nobody -dev -l $LOGDIR -h $NETWORK -c $CONF" depend() { need net } start() { - ebegin "Starting $SERVICE" - start-stop-daemon --start --quiet --exec $EXE -- $OPTS 2>&1 >/dev/null + ebegin "Starting snort" + start-stop-daemon --start --quiet --exec /usr/bin/snort \ + -- $OPTS 2>&1 >/dev/null eend $? } stop() { - ebegin "Stopping $SERVICE" + ebegin "Stopping snort" kill -9 `cat $PIDFILE` 2>&1 eend $? } - -restart() { - stop - start -} diff --git a/net-misc/snort/files/snort.confd b/net-misc/snort/files/snort.confd new file mode 100644 index 000000000000..e29219e95b9c --- /dev/null +++ b/net-misc/snort/files/snort.confd @@ -0,0 +1,33 @@ +# Config file for /etc/init.d/snort + +# Make sure this matches your IFACE +PIDFILE=/var/run/snort_eth0.pid + +# comment out the next three lines after you've read them +einfo "Edit /etc/snort/snort.conf and /etc/conf.d/snort" +exit 0; + +# Pick a mode options are -A + +#fast - fast alert mode, write the alert in a simple format with a +# timestamp, alert message, source and destination IPs/ports +# +# full - this is also the default alert mode, so if you specify nothing +# this will automatically be used +# +# unsock - send alerts to a UNIX socket that another program can listen on +# +# none - turn off alerting + +MODE="full" + +# Set this to the appropriate network you box lives on +NETWORK="192.168.1.1/24" + +# You probably don't want to change this, but in case you do +LOGDIR="/var/log/snort" + +# Probably not this either +CONF=/etc/snort/snort.conf +OPTS="-D -s -u nobody -dev -l $LOGDIR -h $NETWORK -c $CONF" + diff --git a/net-misc/snort/snort-1.7.ebuild b/net-misc/snort/snort-1.7.ebuild index 83e3721f9d7b..2d925e4482c6 100644 --- a/net-misc/snort/snort-1.7.ebuild +++ b/net-misc/snort/snort-1.7.ebuild @@ -1,13 +1,11 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Achim Gottinger achim@gentoo.org -# $Header: /var/cvsroot/gentoo-x86/net-misc/snort/snort-1.7.ebuild,v 1.3 2001/09/13 00:09:53 lamer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/snort/snort-1.7.ebuild,v 1.4 2001/12/23 23:25:19 azarah Exp $ -#P= -A="${P}.tar.gz" S=${WORKDIR}/${P} DESCRIPTION="Libpcap packet sniffer/logger/lightweight IDS" -SRC_URI="http://www.snort.org/Files/${A}" +SRC_URI="http://www.snort.org/Files/${P}.tar.gz" HOMEPAGE="http://www.snort.org" DEPEND="virtual/glibc >=net-libs/libpcap-0.5.2 @@ -20,43 +18,56 @@ RDEPEND="virtual/glibc sys-devel/perl src_compile() { - local myconf - if [ `use mysql` ] - then - myconf="--with-mysql-includes=/usr/include/mysql \ - --with-mysql-libraries=/usr/lib/mysql" - else - myconf="--without-mysql" - fi - if [ `use ssl` ] - then - myconf="$myconf --with-openssl" - else - myconf="$myconf --without-openssl" - fi - try ./configure --prefix=/usr --mandir=/usr/share/man --host=${CHOST} \ - --enable-smbalerts --enable-pthreads \ - --without-odbc --without-postgresql --without-oracle $myconf - try make - + local myconf + if [ `use mysql` ] + then + myconf="--with-mysql-includes=/usr/include/mysql \ + --with-mysql-libraries=/usr/lib/mysql" + else + myconf="--without-mysql" + fi + if [ `use ssl` ] + then + myconf="$myconf --with-openssl" + else + myconf="$myconf --without-openssl" + fi + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --host=${CHOST} \ + --enable-smbalerts \ + --enable-pthreads \ + --without-odbc \ + --without-postgresql \ + --without-oracle \ + $myconf || die + + make || die } -src_install () { - - try make DESTDIR=${D} install - insinto /usr/lib/snort/bin - doins contrib/create_mysql contrib/*.pl contrib/snortlog - dodoc AUTHORS BUGS ChangeLog COPYING CREDITS NEWS README.* - dodoc RULES.SAMPLE USAGE contrib/pgsql.php3 - insinto /etc/snort - doins ${FILESDIR}/snort.conf - insinto /usr/lib/snort - doins *lib - insinto /etc/init.d - doexe ${FILESDIR}/snort +src_install() { + + make DESTDIR=${D} install || die + insinto /usr/lib/snort/bin + + doins contrib/create_mysql contrib/*.pl contrib/snortlog + dodoc AUTHORS BUGS ChangeLog COPYING CREDITS NEWS README.* + dodoc RULES.SAMPLE USAGE contrib/pgsql.php3 + + insinto /etc/snort + doins ${FILESDIR}/snort.conf + + insinto /usr/lib/snort + doins *lib + + exeinto /etc/init.d + doexe ${FILESDIR}/snort + insinfo /etc/conf.d + newins ${FILESDIR}/snort.confd snort } pkg_postint() { + groupadd snort useradd -s /dev/null -g snort -s /bin/false snort } |