freebsd-dev/etc/rc.d/ipmon
Dag-Erling Smørgrav 7bd5b79de4 Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal
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
2007-04-02 22:53:07 +00:00

35 lines
689 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: ipmon,v 1.9 2002/04/18 05:02:01 lukem Exp $
# $FreeBSD$
#
# PROVIDE: ipmon
# REQUIRE: FILESYSTEMS hostname sysctl cleanvar ipfilter
# BEFORE: SERVERS
# KEYWORD: nojail
. /etc/rc.subr
name="ipmon"
rcvar=`set_rcvar`
command="/sbin/${name}"
start_precmd="ipmon_precmd"
ipmon_precmd()
{
# Continue only if ipfilter or ipnat is enabled and the
# ipfilter module is loaded.
#
if ! checkyesno ipfilter_enable -o ! checkyesno ipnat_enable ; then
err 1 "${name} requires either ipfilter or ipnat enabled"
fi
if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then
err 1 "ipfilter module is not loaded"
fi
return 0
}
load_rc_config $name
run_rc_command "$1"