freebsd-skq/etc/rc.d/ipmon
dougb 127c69bf43 Remove $NetBSD$ CVS tags. We no longer attempt to synch our rc.d files
with theirs, so this information doesn't need to be in the live file.
Having it in our CVS history is enough.
2007-12-08 07:20:23 +00:00

34 lines
634 B
Bash
Executable File

#!/bin/sh
#
# $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"