Why doesn't this startup script execute on boot?
Andy Dills
andy at xecu.net
Thu May 13 00:10:52 UTC 2010
I'm working on getting p0f integrated with amavisd-new. Everything is
great, with the exception that I can't get the neccessary commands to
execute on boot.
I started with rc.local and that didn't work. So I made this simple script
in /usr/local/etc/rc.d/p0f:
---
#!/bin/sh
# PROVIDE: p0f
# REQUIRE: LOGIN
# BEFORE: securelevel
# KEYWORD: shutdown
. "/etc/rc.subr"
name="p0f"
rcvar=`set_rcvar`
command="/usr/local/bin/p0f"
command_args="-l 'tcp dst port 25' 2>&1 | /usr/local/bin/p0f-analyzer.pl 2345 &"
pidfile="/var/run/$name.pid"
# read configuration and set defaults
load_rc_config "$name"
: ${p0f_enable="NO"}
run_rc_command "$1"
---
It does not execute on boot (yes, it's executable). It executes just fine
by hand.
I'm assuming it has something to do with redirecting stdout and stderr to
another script which is then shoved into the background?
How do I work around this?
(BTW, FreeBSD 8.0-STABLE #2: Wed May 12 13:28:18 EDT 2010)
Thanks,
Andy
---
Andy Dills
Xecunet, Inc.
www.xecu.net
301-682-9972
---
More information about the freebsd-stable
mailing list