From 15c5589b4d7b893e914e3390881e445379c63bc8 Mon Sep 17 00:00:00 2001 From: Ferry Meyndert Date: Fri, 22 Feb 2002 19:57:46 +0000 Subject: cleaned rc script --- net-analyzer/p0f/files/p0f-1.8.2.init | 38 ----------------------------------- net-analyzer/p0f/files/p0f-1.8.2.rc | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 net-analyzer/p0f/files/p0f-1.8.2.init create mode 100644 net-analyzer/p0f/files/p0f-1.8.2.rc (limited to 'net-analyzer/p0f/files') diff --git a/net-analyzer/p0f/files/p0f-1.8.2.init b/net-analyzer/p0f/files/p0f-1.8.2.init deleted file mode 100644 index d24dff8271f4..000000000000 --- a/net-analyzer/p0f/files/p0f-1.8.2.init +++ /dev/null @@ -1,38 +0,0 @@ -#!/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-analyzer/p0f/files/p0f-1.8.2.init,v 1.2 2002/02/21 23:14:00 m0rpheus Exp $ - - -start() { - ebegin "Starting p0f" - # The 'tcp and tcp[13] & 2 = 2' requires at least syn set. - # An alternative would be 'tcp and tcp[13] & 0x3f = 2', which - # is syn and no other major flags (but ECN enabled packets are OK) - if [ -z "$BpfFilter" ]; then - BpfFilter='tcp and tcp[13] & 2 = 2' - else - BpfFilter="$BpfFilter and tcp and tcp[13] & 2 = 2" - fi - - # The command in backticks returns all the local IP addresses on this machine. - for OneIP in `/sbin/ifconfig 2>/dev/null | grep 'inet addr' | sed -e 's/.*addr://' -e 's/ .*//'` ; do - BpfFilter="$BpfFilter and not src host $OneIP" - done - - # Create a lock file. - mkdir -p /var/lock/subsys - touch /var/lock/subsys/p0f - - # Start up p0f and filter out all packets originating from any of this machines IP's. - einfo "Logfile: ${P0FLOGFILE}" - start-stop-daemon --start --quiet --exec /usr/sbin/p0f -- -v "$BpfFilter" >>"/var/log/p0f" 2>&1 & - eend ${?} -} - -stop() { - ebegin "Stopping p0f" - start-stop-daemon --stop --quiet --exec /usr/sbin/p0f - rm -f /var/lock/subsys/p0f - eend ${?} -} diff --git a/net-analyzer/p0f/files/p0f-1.8.2.rc b/net-analyzer/p0f/files/p0f-1.8.2.rc new file mode 100644 index 000000000000..fb2e7411d930 --- /dev/null +++ b/net-analyzer/p0f/files/p0f-1.8.2.rc @@ -0,0 +1,38 @@ +#!/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-analyzer/p0f/files/p0f-1.8.2.rc,v 1.1 2002/02/22 19:57:46 m0rpheus Exp $ + + +start() { + ebegin "Starting p0f" + # The 'tcp and tcp[13] & 2 = 2' requires at least syn set. + # An alternative would be 'tcp and tcp[13] & 0x3f = 2', which + # is syn and no other major flags (but ECN enabled packets are OK) + if [ -z "$BpfFilter" ]; then + BpfFilter='tcp and tcp[13] & 2 = 2' + else + BpfFilter="$BpfFilter and tcp and tcp[13] & 2 = 2" + fi + + # The command in backticks returns all the local IP addresses on this machine. + for OneIP in `/sbin/ifconfig 2>/dev/null | grep 'inet addr' | sed -e 's/.*addr://' -e 's/ .*//'` ; do + BpfFilter="$BpfFilter and not src host $OneIP" + done + + # Create a lock file. + mkdir -p /var/lock/subsys + touch /var/lock/subsys/p0f + + # Start up p0f and filter out all packets originating from any of this machines IP's. + einfo "Logfile: ${P0FLOGFILE}" + start-stop-daemon --start --quiet --exec /usr/sbin/p0f -- -v "$BpfFilter" >>"/var/log/p0f" 2>&1 & + eend ${?} +} + +stop() { + ebegin "Stopping p0f" + start-stop-daemon --stop --quiet --exec /usr/sbin/p0f + rm -f /var/lock/subsys/p0f + eend ${?} +} -- cgit v1.2.3-65-gdbad