]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/initscripts/init.d/network
Merge branch 'unbound' into next
[ipfire-2.x.git] / src / initscripts / init.d / network
index a02c585819f423a99094fd3f229a63edf86a0122..b29ca2ca5b309f143cd9e1b9521dc635dbb31601 100644 (file)
 . ${rc_functions}
 eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
 
-init_networking() {
-       boot_mesg "Loading firewall modules into the kernel"
-       modprobe iptable_nat || failed=1
-       for i in $(find /lib/modules/$(uname -r) -name ip_conntrack*); do
-               modprobe $(basename $i | cut -d. -f1) || failed=1
-       done
-       for i in $(find /lib/modules/$(uname -r) -name ip_nat*); do
-               modprobe $(basename $i | cut -d. -f1) || failed=1
-       done
-       (exit ${failed})
-       evaluate_retval
-                        
-       boot_mesg "Setting up firewall"
-       /etc/rc.d/init.d/firewall start; evaluate_retval
-
-#      boot_mesg "Setting up traffic accounting"
-#      /etc/rc.d/helper/writeipac.pl || failed=1
-#      /usr/sbin/fetchipac -S || failed=1
-#      (exit ${failed})
-#      evaluate_retval
-
-       boot_mesg "Setting up DMZ pinholes"
-       /usr/local/bin/setdmzholes; evaluate_retval
-
-       if [ "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "4" ]; then
-               boot_mesg "Setting up wireless firewall rules"
-               /usr/local/bin/wirelessctrl; evaluate_retval
-       fi
-
-       /etc/rc.d/init.d/dnsmasq start
-}
-
 DO="${1}"
 shift
 
 if [ -n "${1}" ]; then
        ALL=0
-       for i in green red blue orange; do      
+       for i in green red blue orange; do
                eval "${i}=0"
        done
 else
@@ -74,8 +42,6 @@ done
 
 case "${DO}" in
        start)
-               [ "${ALL}" == "1" ] && init_networking
-
                # Starting interfaces...
                # GREEN
                [ "$green" == "1" ] && /etc/rc.d/init.d/networking/green start
@@ -95,7 +61,9 @@ case "${DO}" in
                                rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
                                [ "$AUTOCONNECT" == "off" ] || /etc/rc.d/init.d/networking/red start
                        fi
-               fi                           
+               fi
+
+               /etc/rc.d/init.d/static-routes start
                ;;
 
        stop)
@@ -118,8 +86,7 @@ case "${DO}" in
                        fi
                fi
 
-               # Stopping dnsmasq if network all networks shutdown
-               [ "${ALL}" == "1" ] && /etc/rc.d/init.d/dnsmasq stop
+               exit 0
                ;;
 
        restart)