summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Smee <strerror@gentoo.org>2005-10-09 13:54:39 +0000
committerBenjamin Smee <strerror@gentoo.org>2005-10-09 13:54:39 +0000
commit19b913caa5809642ec768b18fc943de0e5d36d7e (patch)
tree4b3661a7b42d0b2a1079d6e1dc402654eb033c19 /net-analyzer/sguil-sensor/files
parentCheck if the freebsd patch was already applied when it fails to apply. (diff)
downloadgentoo-2-19b913caa5809642ec768b18fc943de0e5d36d7e.tar.gz
gentoo-2-19b913caa5809642ec768b18fc943de0e5d36d7e.tar.bz2
gentoo-2-19b913caa5809642ec768b18fc943de0e5d36d7e.zip
New log_packets initd and confd. Changed einfo
(Portage version: 2.0.51.22-r3)
Diffstat (limited to 'net-analyzer/sguil-sensor/files')
-rw-r--r--net-analyzer/sguil-sensor/files/digest-sguil-sensor-0.5.3-r11
-rw-r--r--net-analyzer/sguil-sensor/files/log_packets.confd20
-rw-r--r--net-analyzer/sguil-sensor/files/log_packets.initd17
3 files changed, 30 insertions, 8 deletions
diff --git a/net-analyzer/sguil-sensor/files/digest-sguil-sensor-0.5.3-r1 b/net-analyzer/sguil-sensor/files/digest-sguil-sensor-0.5.3-r1
new file mode 100644
index 000000000000..e75aa2ff25cd
--- /dev/null
+++ b/net-analyzer/sguil-sensor/files/digest-sguil-sensor-0.5.3-r1
@@ -0,0 +1 @@
+MD5 681fa7e99aa674c0e2be4788ef503d69 sguil-sensor-0.5.3.tar.gz 89816
diff --git a/net-analyzer/sguil-sensor/files/log_packets.confd b/net-analyzer/sguil-sensor/files/log_packets.confd
new file mode 100644
index 000000000000..591454bd6b2f
--- /dev/null
+++ b/net-analyzer/sguil-sensor/files/log_packets.confd
@@ -0,0 +1,20 @@
+# Config file for /etc/init.d/log_packets
+
+# This tell snort which interface to listen on (any for every interface)
+IFACE=eth1
+
+# Make sure this matches your IFACE
+PIDFILE=/var/run/log_packets_$IFACE.pid
+
+# You probably don't want to change this, but in case you do
+LOGDIR="/var/lib/sguil"
+
+# Probably not this either
+CONF=/etc/snort/snort.conf
+
+# Percentage of disk to try and maintain
+MAX_DISK_USE=95
+
+# This pulls in the options above
+#SNORT_OPTS="-D -m 122 -u sguil -g sguil -A none -i $IFACE -l $LOGDIR -c $CONF"
+OPTIONS="-m 122 -u sguil -g sguil"
diff --git a/net-analyzer/sguil-sensor/files/log_packets.initd b/net-analyzer/sguil-sensor/files/log_packets.initd
index 470d34a5c306..db9ae1000490 100644
--- a/net-analyzer/sguil-sensor/files/log_packets.initd
+++ b/net-analyzer/sguil-sensor/files/log_packets.initd
@@ -1,21 +1,22 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sguil-sensor/files/log_packets.initd,v 1.1 2005/10/08 14:04:11 strerror Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sguil-sensor/files/log_packets.initd,v 1.2 2005/10/09 13:54:39 strerror Exp $
opts="start stop cleandisk"
-[ -d "${LOG_DIR}" ] && LOGDIR="/var/log/sguild"
-
start() {
- ebegin "Starting Sensor Agent"
+ ebegin "Starting Log_packest"
if [ ! -x /usr/bin/snort ]
then
eerror "No snort - cannot start"
eend 1
return 1
fi
+
+ LOG_DIR="${LOGDIR}/${HOSTNAME}/dailylogs"
+
if [ ! -d ${LOG_DIR} ]
then
mkdir -p ${LOG_DIR}
@@ -29,9 +30,9 @@ start() {
mkdir "${LOG_DIR}/${today}"
chmod 770 "${LOG_DIR}/${today}"
fi
- start-stop-daemon --start -c sguil --pidfile /var/run/sguil/logpackets.pid \
+ start-stop-daemon --start --quiet -b -m --pidfile /var/run/sguil/logpackets.pid \
--exec /usr/bin/snort \
- -- ${OPTIONS} -l "${LOG_DIR}/${today}" -b -i "${INTERFACE}" "${FILTER}"
+ -- ${OPTIONS} -l "${LOG_DIR}/${today}" -b -i "${IFACE}" "${FILTER}"
real_cleandisk
eend $?
}
@@ -53,10 +54,10 @@ cleandisk() {
real_cleandisk() {
einfo "Checking disk space (limited to ${MAX_DISK_USE}%)..."
# grep, awk, tr...woohoo!
- CUR_USE=$(df ${LOG_DIR} | grep -v -i filesystem | awk '{print $5}' | tr -d %)
+ CUR_USE=$(df -P ${LOG_DIR} | grep -v -i filesystem | awk '{print $5}' | tr -d %)
einfo " Current Disk Use: ${CUR_USE}%"
- if [ ${CUR_USE} -gt ${MAX_DISK_USE }]
+ if [ ${CUR_USE} -gt ${MAX_DISK_USE} ]
then
# If we are here then we passed our disk limit
# First find the oldest DIR