ipmon revision 103019
178344Sobrien#!/bin/sh 278344Sobrien# 398184Sgordon# $NetBSD: ipmon,v 2002/04/18 05:02:01 lukem Exp $ 498184Sgordon# $FreeBSD: head/etc/rc.d/ipmon 103019 2002-09-06 16:18:05Z gordon $ 578344Sobrien# 678344Sobrien 778344Sobrien# PROVIDE: ipmon 878344Sobrien# REQUIRE: syslogd 998184Sgordon# BEFORE: SERVERS 1098184Sgordon# KEYWORD: FreeBSD NetBSD 1178344Sobrien 1278344Sobrien. /etc/rc.subr 1378344Sobrien 1478344Sobrienname="ipmon" 1598184Sgordonrcvar=`set_rcvar` 1678344Sobrien 17103019Sgordoncase ${OSTYPE} in 1898184SgordonFreeBSD) 1998184Sgordon command="/sbin/ipmon" 2098184Sgordon start_precmd="ipmon_precmd" 2198184Sgordon ;; 2298184SgordonNetBSD) 2398184Sgordon command="/usr/sbin/${name}" 2498184Sgordon command_args="-D" 2598184Sgordonesac 2698184Sgordon 2798184Sgordonipmon_precmd() 2898184Sgordon{ 2998184Sgordon # Make sure ipfilter is loaded before continuing 3098184Sgordon if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1 ; then 3198184Sgordon return 1 3298184Sgordon fi 3398184Sgordon return 0 3498184Sgordon} 3598184Sgordon 3678344Sobrienload_rc_config $name 3778344Sobrienrun_rc_command "$1" 38