Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172300 - net-analyzer/p0f - init.d script is stopping all running instances
Summary: net-analyzer/p0f - init.d script is stopping all running instances
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-26 14:51 UTC by steveb
Modified: 2007-03-28 20:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description steveb 2007-03-26 14:51:42 UTC
When I start p0f with the init.d script and later start another p0f instance by hand or another script and then again execute the init.d script with the stop action, then the init.d script will kill/stop all running p0f instances.

Can the init.d script be changed to work with pid files?
--- /etc/init.d/p0f     2007-03-26 16:39:49.006744559 +0200
+++ /usr/portage/net-analyzer/p0f/files/p0f.initd2      2007-01-06 20:36:06.000000000 +0100
@@ -29,14 +29,14 @@
                P0FLOGFILE="/var/log/p0f"
        fi
        einfo "Logfile: ${P0FLOGFILE}"
-       start-stop-daemon --start --pidfile /var/run/p0f.pid --quiet --exec /usr/sbin/p0f -- -i "${P0FDEVICE}" \
+       start-stop-daemon --start --quiet --exec /usr/sbin/p0f -- -i "${P0FDEVICE}" \
                ${P0FOPTIONS} -o "${P0FLOGFILE}" -d "${BpfFilter}" 2>/dev/null
        eend ${?}
 }

 stop() {
        ebegin "Stopping p0f"
-       start-stop-daemon --stop --quiet --pidfile /var/run/p0f.pid
+       start-stop-daemon --stop --quiet --exec /usr/sbin/p0f
        rm -f /var/lock/subsys/p0f
        eend ${?}
 }




Reproducible: Always

Steps to Reproduce:
1. emerge net-analyzer/p0f
2. emerge mail-filter/amavisd-new
3. /etc/init.d/p0f start
4. p0f -l 'tcp dst port 25' 2>&1 | p0f-analyzer.pl 2345 &
5. ps auxw|gerp p0f
6. /etc/init.d/p0f stop

The second p0f instance is gone after executing step 6.
Comment 1 Cédric Krier gentoo-dev 2007-03-28 20:42:10 UTC
Fix in cvs