mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
143085107b
* Space -> tabs conversion. * Removed blanks before semicolon in "if ... ; then". * Proper indentation of misindented lines. * Put a full stop after some comments. * Removed whitespace at end of line. Approved by: silence from gordon
38 lines
545 B
Bash
Executable File
38 lines
545 B
Bash
Executable File
#!/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"
|