Browse Source

Function ordering

Bob Mottram 9 years ago
parent
commit
a2aa35524f
1 changed files with 9 additions and 9 deletions
  1. 9
    9
      src/freedombone

+ 9
- 9
src/freedombone View File

1281
   fi
1281
   fi
1282
 }
1282
 }
1283
 
1283
 
1284
+function save_firewall_settings {
1285
+  iptables-save > /etc/firewall.conf
1286
+  ip6tables-save > /etc/firewall6.conf
1287
+  printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
1288
+  printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
1289
+  printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables
1290
+  chmod +x /etc/network/if-up.d/iptables
1291
+}
1292
+
1284
 function enable_ipv6 {
1293
 function enable_ipv6 {
1285
   # endure that ipv6 is enabled and can route
1294
   # endure that ipv6 is enabled and can route
1286
   sed -i 's/net.ipv6.conf.all.disable_ipv6.*/net.ipv6.conf.all.disable_ipv6 = 0/g' /etc/sysctl.conf
1295
   sed -i 's/net.ipv6.conf.all.disable_ipv6.*/net.ipv6.conf.all.disable_ipv6 = 0/g' /etc/sysctl.conf
5892
   echo 'configure_firewall' >> $COMPLETION_FILE
5901
   echo 'configure_firewall' >> $COMPLETION_FILE
5893
 }
5902
 }
5894
 
5903
 
5895
-function save_firewall_settings {
5896
-  iptables-save > /etc/firewall.conf
5897
-  ip6tables-save > /etc/firewall6.conf
5898
-  printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
5899
-  printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
5900
-  printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables
5901
-  chmod +x /etc/network/if-up.d/iptables
5902
-}
5903
-
5904
 function configure_firewall_ping {
5904
 function configure_firewall_ping {
5905
   if grep -Fxq "configure_firewall_ping" $COMPLETION_FILE; then
5905
   if grep -Fxq "configure_firewall_ping" $COMPLETION_FILE; then
5906
       return
5906
       return