summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/ipmon
blob: 12ef6cc60966e423b11d6957985824cbaf816820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
#
# $NetBSD: ipmon,v 2002/04/18 05:02:01 lukem Exp $
# $FreeBSD$
#

# PROVIDE: ipmon
# REQUIRE: syslogd
# BEFORE:  SERVERS
# KEYWORD: FreeBSD NetBSD

. /etc/rc.subr

name="ipmon"
rcvar=`set_rcvar`

case ${OSTYPE} in
FreeBSD)
	command="/sbin/ipmon"
	start_precmd="ipmon_precmd"
	;;
NetBSD)
	command="/usr/sbin/${name}"
	command_args="-D"
esac

ipmon_precmd()
{
	# Make sure ipfilter is loaded before continuing
	if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then
		return 1
	fi
	return 0
}

load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud