On Thu, 13 May 2010, Yuri Pankov wrote:
> On Wed, May 12, 2010 at 04:20:12PM -0400, Andy Dills wrote:
> >
> > I'm working on integrating p0f with amavisd-new, and the command I need
> > to run at startup is a little unwieldy:
> >
> > p0f -l 'tcp dst port 25' 2>&1 | /usr/local/bin/p0f-analyzer.pl 2345 &
> >
> > At first, I tried putting that in /etc/rc.local. No luck, don't know why
> > it doesn't run. Ok, I tell myself, rc.local is a dinosaur anyway, take a
> > second and make a simple rc.d script.
> >
> > So, I made /usr/local/etc/rc.d/p0fd containing:
> >
> > ---
> >
> > #!/bin/sh
> > #
>
> Quoting rc(8):
> Each script should contain rcorder(8) keywords, especially an appropriate
> “PROVIDE” entry, and if necessary “REQUIRE” and “BEFORE” keywords.
Thanks for the reply.
I added this to the script (and renamed it p0f instead of p0fd):
# PROVIDE: p0f
# REQUIRE: LOGIN
# BEFORE: securelevel
# KEYWORD: shutdown
It did not change the result, it still fails to start on boot, and still
works if I call "/usr/local/etc/rc.d/p0f start" once I login to the box
after it boots. Any other suggestions?
I have to assume it has something to do with either the redirection of
stdout and stderr to a script that is then backgrounded? If I do something
that doesn't involve all of that, it starts fine on boot.
How do I correct this? Earlier attempts went as far as to make a script to
start the process, and then call the script from /etc/rc.local. I even
tried doing a "/usr/local/etc/rc.d/p0f start" in /etc/rc.local. Nothing
works until I go in and run the startup script by hand.
Thanks,
Andy
---
Andy Dills
Xecunet, Inc.
www.xecu.net
301-682-9972
---
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"