Firewall: fix Update from core 75 to 76
authorAlexander Marx <alexander.marx@ipfire.org>
Thu, 27 Mar 2014 10:58:48 +0000 (11:58 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Mar 2014 14:07:41 +0000 (15:07 +0100)
config/firewall/convert-outgoingfw
config/rootfiles/common/configroot
config/rootfiles/core/76/filelists/firewall
config/rootfiles/core/76/update.sh
lfs/configroot

index ea49375..2f9b74c 100755 (executable)
@@ -78,6 +78,11 @@ else
 
 if (! -s "$outfwsettings") {
         print "Empty DMZ configuration file. Nothing to do. Exiting...\n";
+        #Fill the firewall settings file
+       open (SETTINGS, ">/var/ipfire/firewall/settings");
+       print SETTINGS "POLICY=MODE2\n";
+       print SETTINGS "POLICY1=MODE2\n";
+       close (SETTINGS);
         exit(0);
 }
 
index f509370..b5de989 100644 (file)
@@ -63,6 +63,7 @@ var/ipfire/fwhosts
 #var/ipfire/fwhosts/customnetworks
 #var/ipfire/fwhosts/customservicegrp
 #var/ipfire/fwhosts/customservices
+#var/ipfire/fwhosts/customservices.default
 #var/ipfire/fwhosts/icmp-types
 var/ipfire/fwlogs
 #var/ipfire/fwlogs/ipsettings
index e770307..6eeaeae 100644 (file)
@@ -11,3 +11,4 @@ usr/sbin/firewall-policy
 var/ipfire/firewall/p2protocols
 var/ipfire/fwhosts/icmp-types
 var/ipfire/menu.d/50-firewall.menu
+var/ipfire/fwhosts/customservices.default
index a9055d3..0561f39 100644 (file)
@@ -291,6 +291,10 @@ touch /var/ipfire/fwhosts/customgroups
 touch /var/ipfire/fwhosts/customservices
 touch /var/ipfire/fwhosts/customservicegrp
 
+if [ ! -s "/var/ipfire/fwhosts/customservices" ];then
+       cp /var/ipfire/fwhosts/customservices.default /var/ipfire/fwhosts/customservices
+fi
+
 # Fix ownership.
 chown -R nobody:nobody /var/ipfire/firewall
 chown -R nobody:nobody /var/ipfire/fwhosts
index 8250a77..3232d38 100644 (file)
@@ -107,6 +107,7 @@ $(TARGET) :
        cp $(DIR_SRC)/config/firewall/firewall-policy   /usr/sbin/firewall-policy
        cp $(DIR_SRC)/config/fwhosts/icmp-types                 $(CONFIG_ROOT)/fwhosts/icmp-types
        cp $(DIR_SRC)/config/fwhosts/customservices             $(CONFIG_ROOT)/fwhosts/customservices
+       cp $(DIR_SRC)/config/fwhosts/customservices             $(CONFIG_ROOT)/fwhosts/customservices.default
        # Oneliner configfiles
        echo  "ENABLED=off"             > $(CONFIG_ROOT)/vpn/settings
        echo  "VPN_DELAYED_START=0"     >>$(CONFIG_ROOT)/vpn/settings