-case "${1}" in
- start)
- boot_mesg "Loading iptables helper modules"
- modprobe iptable_nat || failed=1
- modprobe ip_conntrack || failed=1
- modprobe ip_conntrack_ftp || failed=1
- modprobe ip_nat_ftp || failed=1
- modprobe ip_conntrack_h323 || failed=1
- modprobe ip_nat_h323 || failed=1
- modprobe ip_conntrack_irc || failed=1
- modprobe ip_nat_irc || failed=1
- modprobe ip_conntrack_mms || failed=1
- modprobe ip_nat_mms || failed=1
- modprobe ip_conntrack_pptp || failed=1
- modprobe ip_nat_pptp || failed=1
- modprobe ip_conntrack_sip || failed=1
- modprobe ip_nat_sip || failed=1
- (exit ${failed})
- evaluate_retval
-
- # Remove possible leftover files
- rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
-
- boot_mesg "Setting up IPFire firewall rules"
- /etc/rc.d/init.d/firewall start; evaluate_retval
-
- boot_mesg "Setting up IP Accounting"
- /etc/rc.d/helper/writeipac.pl || failed=1
- /usr/sbin/fetchipac -S || failed=1
- (exit ${failed})
- evaluate_retval
-
- boot_mesg "Setting IPFire DMZ pinholes"
- /usr/local/bin/setdmzholes; evaluate_retval
-
- if [ "$CONFIG_TYPE" = "4" -o "$CONFIG_TYPE" = "5" -o "$CONFIG_TYPE" = "6" -o "$CONFIG_TYPE" = "7" ]; then
- boot_mesg "Setting up wireless firewall rules"
- /usr/local/bin/restartwireless; evaluate_retval
+ # Enable netfilter accounting
+ sysctl net.netfilter.nf_conntrack_acct=1 > /dev/null
+
+ if [ -e /var/ipfire/main/disable_nf_sip ]; then
+ rmmod nf_nat_sip
+ rmmod nf_conntrack_sip
+ rmmod nf_nat_h323
+ rmmod nf_conntrack_h323
+ fi
+
+ boot_mesg "Setting up firewall"
+ /etc/rc.d/init.d/firewall start; evaluate_retval
+
+ /etc/rc.d/init.d/dnsmasq start
+ /etc/rc.d/init.d/static-routes start
+}
+
+DO="${1}"
+shift
+
+if [ -n "${1}" ]; then
+ ALL=0
+ for i in green red blue orange; do
+ eval "${i}=0"
+ done
+else
+ ALL=1
+ for i in green red blue orange; do
+ eval "${i}=1"
+ done
+fi
+
+while [ ! $# = 0 ]; do
+ for i in green red blue orange; do
+ if [ "${i}" == "${1}" ]; then
+ eval "${i}=1"
+ shift