fRANz wrote: > On Thu, Jan 29, 2015 at 10:54 PM, Christopher Barry > <christopher.r.ba...@gmail.com> wrote: > > > what happens if you source /etc/rc.local instead? > > as in: > > [ -f /etc/rc.local ] && . /etc/rc.local > > Hi Christopher, > I'm sorry, same behaviour: some commands were correctly invoked, for example: > > /sbin/ifconfig pflog0 up && /sbin/pflogd -f /dev/null > > but not tcpdump in this specific form: > > sudo nohup tcpdump -n -v -l -q -n -e -ttt -i pflog0 action block | > logger -t pf -p local2.info & > > The complete file is: > > # cat /etc/rc.local > /sbin/ifconfig pflog0 up && /sbin/pflogd -f /dev/null > sudo nohup tcpdump -n -v -l -q -n -e -ttt -i pflog0 action block | > logger -t pf -p local2.info & > > I already tried full paths but don't help. > > Again, > it's not a problem hack the rc file but when possible I avoid it, as > suggested many times in this list ;-)
This is the kind of thing I usually put in a small script, and add to root's crontab. I don't think you need the nohup and sudo, that's probably just complicating things. e.g. #!/bin/sh tcpdump -n | logger 2> error.log & then @reboot /root/tcpdump.sh