On 2015-02-02 Mon 20:03 PM |, fRANz wrote:
> 
> # 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 &
  ^^^^ ?

/etc/rc.local is run by root on boot.

Check the environment rc.local runs with
by putting in something *like* this:

#!/bin/sh
#
#       $Id$
#

tmp=$(mktemp)
print ${tmp} > ${tmp}
logname >> ${tmp}
umask >> ${tmp}
pwd >> ${tmp}
printenv | sort >> ${tmp}
cat ${tmp} | mail -s 'rc.local env' root

ifconfig pflog0 up && pflogd -f /dev/null
tcpdump -n -v -l -q -n -e -ttt -i pflog0 action block | logger -t pf -p 
local2.info &





Cheers,
-- 
Craig Skinner.
Another superb Scottish country dance by Edinburgh University:
https://twitter.com/Craig_Skinner/status/562546356926308353
http://NewScotland.Org.UK/
GUSCDC (Glasgow Uni) ball in 3 weeks time!

Reply via email to