ipmon revision 126744
1#!/bin/sh 2# 3# $NetBSD: ipmon,v 2002/04/18 05:02:01 lukem Exp $ 4# $FreeBSD: head/etc/rc.d/ipmon 126744 2004-03-08 12:25:05Z pjd $ 5# 6 7# PROVIDE: ipmon 8# REQUIRE: mountcritlocal hostname sysctl cleanvar 9# BEFORE: SERVERS 10# KEYWORD: FreeBSD nojail 11 12. /etc/rc.subr 13 14name="ipmon" 15rcvar=`set_rcvar` 16command="/sbin/ipmon" 17start_precmd="ipmon_precmd" 18 19ipmon_precmd() 20{ 21 # Continue only if ipfilter or ipnat is enabled and the 22 # ipfilter module is loaded. 23 # 24 if ! checkyesno ipfilter_enable -o ! checkyesno ipnat_enable ; then 25 err 1 "${name} requires either ipfilter or ipnat enabled" 26 fi 27 if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then 28 err 1 "ipfilter module is not loaded" 29 fi 30 return 0 31} 32 33load_rc_config $name 34run_rc_command "$1" 35