Add gcc40 build hooks. Gcc40 isn't built per default, you will have to
[dragonfly.git] / etc / rc.d / ipmon
1 #!/bin/sh
2 #
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.3 2004/01/26 17:21:15 rob Exp $
6 #
7
8 # PROVIDE: ipmon
9 # REQUIRE: mountcritlocal hostname sysctl cleanvar
10 # BEFORE:  SERVERS
11 # KEYWORD: DragonFly FreeBSD NetBSD
12
13 . /etc/rc.subr
14
15 name="ipmon"
16 rcvar=`set_rcvar`
17
18         command="/sbin/ipmon"
19         start_precmd="ipmon_precmd"
20
21 ipmon_precmd()
22 {
23         # Continue only if ipfilter or ipnat is enabled and the
24         # ipfilter module is loaded.
25         #
26         if ! checkyesno ipfilter_enable -o ! checkyesno ipnat_enable ; then
27                 err 1  "${name} requires either ipfilter or ipnat enabled"
28         fi
29         if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then
30                 err 1 "ipfilter module is not loaded"
31         fi
32         return 0
33 }
34
35 load_rc_config $name
36 run_rc_command "$1"