Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123169 - snort init script should use --pidfile in start
Summary: snort init script should use --pidfile in start
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-17 07:28 UTC by Eric Brown
Modified: 2006-02-17 08:22 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 Eric Brown 2006-02-17 07:28:06 UTC
We already have a pid file specified in stop(), so the start function should also use it.  An added benefit of this approach is that this also makes the init scripts work when you run multiple instances of snort.  Here's what the start function should look like:

start() {
    checkconfig || return 1
    ebegin "Starting snort"
    start-stop-daemon --start --quiet --exec /usr/bin/snort --pidfile {$PIDFILE} \
        -- ${SNORT_OPTS} >/dev/null 2>&1
    eend $?
}
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2006-02-17 08:22:23 UTC
Thanks, added in 2.4.3-r2.