2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $NetBSD: ipmon,v 2002/04/18 05:02:01 lukem Exp $
|
|
|
|
# $FreeBSD$
|
2001-06-16 07:16:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: ipmon
|
|
|
|
# REQUIRE: syslogd
|
2002-06-13 22:14:37 +00:00
|
|
|
# BEFORE: SERVERS
|
|
|
|
# KEYWORD: FreeBSD NetBSD
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="ipmon"
|
2002-06-13 22:14:37 +00:00
|
|
|
rcvar=`set_rcvar`
|
|
|
|
|
|
|
|
case `${CMD_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
|
|
|
|
}
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|