kernel - fix bug in objcache_destroy()
[dragonfly.git] / etc / rc.d / ipmon
bloba0e4d1e965ffd24bc0e30b8cd6a96fbfb3cb4944
1 #!/bin/sh
3 # $NetBSD: ipmon,v 2002/04/18 05:02:01 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/ipmon,v 1.6 2003/07/14 13:02:36 mtm Exp $
5 # $DragonFly: src/etc/rc.d/ipmon,v 1.4 2005/11/19 21:47:32 swildner Exp $
8 # PROVIDE: ipmon
9 # REQUIRE: mountcritlocal hostname sysctl cleanvar
10 # BEFORE: SERVERS
12 . /etc/rc.subr
14 name="ipmon"
15 rcvar=`set_rcvar`
17 command="/sbin/ipmon"
18 start_precmd="ipmon_precmd"
20 ipmon_precmd()
22 # Continue only if ipfilter or ipnat is enabled and the
23 # ipfilter module is loaded.
25 if ! checkyesno ipfilter_enable -o ! checkyesno ipnat_enable ; then
26 err 1 "${name} requires either ipfilter or ipnat enabled"
28 if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then
29 err 1 "ipfilter module is not loaded"
31 return 0
34 load_rc_config $name
35 run_rc_command "$1"