1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $NetBSD: ipmon,v 1.2 2000/05/13 08:45:07 lukem Exp $
| 3# $NetBSD: ipmon,v 2002/04/18 05:02:01 lukem Exp $ 4# $FreeBSD: head/etc/rc.d/ipmon 98184 2002-06-13 22:14:37Z gordon $
|
4# 5 6# PROVIDE: ipmon 7# REQUIRE: syslogd
| 5# 6 7# PROVIDE: ipmon 8# REQUIRE: syslogd
|
| 9# BEFORE: SERVERS 10# KEYWORD: FreeBSD NetBSD
|
8 9. /etc/rc.subr 10 11name="ipmon"
| 11 12. /etc/rc.subr 13 14name="ipmon"
|
12rcvar=$name 13command="/usr/sbin/${name}" 14command_args="&"
| 15rcvar=`set_rcvar`
|
15
| 16
|
| 17case `${CMD_OSTYPE}` in 18FreeBSD) 19 command="/sbin/ipmon" 20 start_precmd="ipmon_precmd" 21 ;; 22NetBSD) 23 command="/usr/sbin/${name}" 24 command_args="-D" 25esac 26 27ipmon_precmd() 28{ 29 # Make sure ipfilter is loaded before continuing 30 if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1 ; then 31 return 1 32 fi 33 return 0 34} 35
|
16load_rc_config $name 17run_rc_command "$1"
| 36load_rc_config $name 37run_rc_command "$1"
|