[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pflogd



On Tue, 27 May 2003, Uwe Dippel wrote:
> (discard if this is more of an OpenBSD-question)
> How to reasonably start pflogd ?
> Of course,
> ifconfig pflog0 up
> pflogd
> works.
> For automatic start at boot, I even added an /etc/hostname.pflog0 with
> 'up' plus the "" as pflogd_flags in /etc/rc.conf.local.
> But this doesn't bring it up at boot.
> ifconfig pglog0
> shows it as 'UP', though, and a simple, manual
> pflogd
> after logon brings it up as well.
>
> Here a descrepancy creeps up:
> FAQ - 10 says:
>
> "After the kernel is booted, /etc/rc is started:
>
>     * Filesystems are checked. This will be bypassed if the file
> /etc/fastboot exists. This is certainly not a good idea though.
>     * Configuration variables are read in from /etc/rc.conf and,
> afterwards, /etc/rc.conf.local. Settings in rc.conf.local will override
> those in rc.conf.
>     * Filesystems are mounted
>     * Clears out /tmp and preserves any editor files
>     * Configures the network via /etc/netstart
>           o Configures your interfaces up.
>           o Sets your hostname, domainname, etc.
>     * Starts system daemons
>     * Performs various other checks (quotas, savecore, etc)
>     * Local daemons are run, via /etc/rc.local "
>
> Then these pflogd_flags would be useless, because - according to the
> FAQ - the interfaces are started after rc.conf.local. Which would
> explain, that pflogd refuses to start like this.
> If I enter the 'usual' if - fi construction in rc.local for pflogd into
> rc.local, it does start at boot.
> To me this still looks a 'workaround', because we are not supposed to
> start any daemon here that has an entry in rc.conf.
>
> Any mistake on my side ??
Yes ;-)
> Thanks for advice !
Change pf=NO to pf=YES in /etc/rc.conf and leave the pflogd_flags as
they are (or change them to what you like as long as you don't change it
to pflogd_flags=NO).
Just read /etc/rc to see how this get started:
if [ X"${pf}" != X"NO" -a X"${pflogd_flags}" != X"NO" ]; then
        ifconfig pflog0 up
        pflogd ${pflogd_flags}
fi
Cheers,
Dries