1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $FreeBSD: head/etc/rc.d/ipfw 160672 2006-07-25 17:28:18Z yar $
| 3# $FreeBSD: head/etc/rc.d/ipfw 165683 2006-12-31 10:37:18Z yar $
|
4# 5 6# PROVIDE: ipfw 7# REQUIRE: ppp 8# BEFORE: NETWORKING 9# KEYWORD: nojail 10 11. /etc/rc.subr 12. /etc/network.subr 13 14name="ipfw" 15rcvar="firewall_enable" 16start_cmd="ipfw_start"
| 4# 5 6# PROVIDE: ipfw 7# REQUIRE: ppp 8# BEFORE: NETWORKING 9# KEYWORD: nojail 10 11. /etc/rc.subr 12. /etc/network.subr 13 14name="ipfw" 15rcvar="firewall_enable" 16start_cmd="ipfw_start"
|
17start_precmd="ipfw_precmd"
| |
18stop_cmd="ipfw_stop"
| 17stop_cmd="ipfw_stop"
|
| 18required_modules="ipfw"
|
19
| 19
|
20ipfw_precmd() 21{ 22 if ! ${SYSCTL} net.inet.ip.fw.enable > /dev/null 2>&1; then 23 if ! kldload ipfw; then 24 warn unable to load firewall module. 25 return 1 26 fi 27 fi 28 29 return 0 30} 31
| |
32ipfw_start() 33{ 34 # set the firewall rules script if none was specified 35 [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall 36 37 if [ -r "${firewall_script}" ]; then 38 if [ -f /etc/rc.d/natd ] ; then 39 /etc/rc.d/natd start
--- 33 unchanged lines hidden --- | 20ipfw_start() 21{ 22 # set the firewall rules script if none was specified 23 [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall 24 25 if [ -r "${firewall_script}" ]; then 26 if [ -f /etc/rc.d/natd ] ; then 27 /etc/rc.d/natd start
--- 33 unchanged lines hidden --- |