Date: Tue, 7 Apr 2009 16:29:50 +0000 (UTC) From: Maksim Yevmenkin <emax@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r190808 - stable/7/etc/rc.d Message-ID: <200904071629.n37GTowo014360@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emax Date: Tue Apr 7 16:29:50 2009 New Revision: 190808 URL: http://svn.freebsd.org/changeset/base/190808 Log: MFC r190575 - Add ipfw_nat to the list of required modules if "firewall_nat_enable" is set and "natd_enable" is NOT set; - Accept and pass firewall type to the external firewall script. Submitted by: Yuri Kurenkov < y -dot- kurenkov -at- init -dot- ru > No response from: freebsd-rc Approved by: re (kib) Modified: stable/7/etc/rc.d/ (props changed) stable/7/etc/rc.d/ipfw Modified: stable/7/etc/rc.d/ipfw ============================================================================== --- stable/7/etc/rc.d/ipfw Tue Apr 7 16:15:59 2009 (r190807) +++ stable/7/etc/rc.d/ipfw Tue Apr 7 16:29:50 2009 (r190808) @@ -23,10 +23,20 @@ ipfw_prestart() if checkyesno dummynet_enable; then required_modules="$required_modules dummynet" fi + + if checkyesno firewall_nat_enable; then + if ! checkyesno natd_enable; then + required_modules="$required_modules ipfw_nat" + fi + fi } ipfw_start() { + local _firewall_type + + _firewall_type=$1 + # set the firewall rules script if none was specified [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall @@ -34,7 +44,7 @@ ipfw_start() if [ -f /etc/rc.d/natd ] ; then /etc/rc.d/natd start fi - /bin/sh "${firewall_script}" + /bin/sh "${firewall_script}" "${_firewall_type}" echo 'Firewall rules loaded.' elif [ "`ipfw list 65535`" = "65535 deny ip from any to any" ]; then echo 'Warning: kernel has firewall functionality, but' \ @@ -65,4 +75,4 @@ ipfw_stop() } load_rc_config $name -run_rc_command "$1" +run_rc_command $*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904071629.n37GTowo014360>