and takes over mountcritlocal's role as the early / late divider. This makes it far easier to add rc scripts which need to run early, such as a startup script for zfs, which is right around the corner. This change should be a no-op; I have verified that the only change in rcorder's output is the insertion of FILESYSTEMS immediately after mountcritlocal. MFC after: 3 weeks
57 lines
881 B
Bash
57 lines
881 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: pflog
|
|
# REQUIRE: root FILESYSTEMS netif cleanvar
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="pflog"
|
|
rcvar=`set_rcvar`
|
|
command="/sbin/pflogd"
|
|
pidfile="/var/run/pflogd.pid"
|
|
start_precmd="pflog_prestart"
|
|
stop_postcmd="pflog_poststop"
|
|
extra_commands="reload resync"
|
|
|
|
# for backward compatibility
|
|
resync_cmd="pflog_resync"
|
|
|
|
pflog_prestart()
|
|
{
|
|
load_kld pflog || return 1
|
|
|
|
# set pflog0 interface to up state
|
|
if ! ifconfig pflog0 up; then
|
|
warn 'could not bring up pflog0.'
|
|
return 1
|
|
fi
|
|
|
|
# prepare the command line for pflogd
|
|
rc_flags="-f $pflog_logfile $rc_flags"
|
|
|
|
# report we're ready to run pflogd
|
|
return 0
|
|
}
|
|
|
|
pflog_poststop()
|
|
{
|
|
if ! ifconfig pflog0 down; then
|
|
warn 'could not bring down pflog0.'
|
|
return 1
|
|
fi
|
|
return 0
|
|
}
|
|
|
|
# for backward compatibility
|
|
pflog_resync()
|
|
{
|
|
run_rc_command reload
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|