ipmon (240336) | ipmon (255450) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/ipmon 240336 2012-09-11 05:04:59Z obrien $ | 3# $FreeBSD: head/etc/rc.d/ipmon 255450 2013-09-10 13:48:33Z cy $ |
4# 5 6# PROVIDE: ipmon 7# REQUIRE: FILESYSTEMS hostname sysctl FILESYSTEMS ipfilter 8# BEFORE: SERVERS 9# KEYWORD: nojail 10 11. /etc/rc.subr --- 6 unchanged lines hidden (view full) --- 18ipmon_precmd() 19{ 20 # Continue only if ipfilter or ipnat is enabled and the 21 # ipfilter module is loaded. 22 # 23 if ! checkyesno ipfilter_enable && ! checkyesno ipnat_enable ; then 24 err 1 "${name} requires either ipfilter or ipnat enabled" 25 fi | 4# 5 6# PROVIDE: ipmon 7# REQUIRE: FILESYSTEMS hostname sysctl FILESYSTEMS ipfilter 8# BEFORE: SERVERS 9# KEYWORD: nojail 10 11. /etc/rc.subr --- 6 unchanged lines hidden (view full) --- 18ipmon_precmd() 19{ 20 # Continue only if ipfilter or ipnat is enabled and the 21 # ipfilter module is loaded. 22 # 23 if ! checkyesno ipfilter_enable && ! checkyesno ipnat_enable ; then 24 err 1 "${name} requires either ipfilter or ipnat enabled" 25 fi |
26 if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then | 26 if ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes' >/dev/null 2>&1; then |
27 err 1 "ipfilter module is not loaded" 28 fi 29 return 0 30} 31 32load_rc_config $name 33run_rc_command "$1" | 27 err 1 "ipfilter module is not loaded" 28 fi 29 return 0 30} 31 32load_rc_config $name 33run_rc_command "$1" |