]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Forward Firewall: edited Backup.pl. If someone put /var/ipfire/outgoing into /var...
authorAlexander Marx <amarx@ipfire.org>
Sun, 20 Jan 2013 04:54:04 +0000 (05:54 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:08:13 +0000 (14:08 +0200)
Now the backup takes care of this and checks if there are old rules to convert.

config/backup/backup.pl
config/forwardfw/convert-outgoingfw [changed mode: 0644->0755]
config/forwardfw/convert-xtaccess [changed mode: 0644->0755]

index 28129e46ecc9747e8f588e1801f15fe5096e9c2f..b21716185eaad0bdbf653b36ed97b23ff97e9ebb 100644 (file)
@@ -64,13 +64,24 @@ elsif ($ARGV[0] eq 'restore') {
   system("cd / && tar -xvz -p -f /tmp/restore.ipf");
   #Here some converter scripts to correct old Backups (before core 65)
   system("/usr/sbin/ovpn-ccd-convert");
-  if( -d "/var/ipfire/outgoing"){
+  if( -d "${General::swroot}/outgoing"){
+         if( -f "${General::swroot}/forward/config" ){ 
+                 unlink("${General::swroot}/forward/config");
+                 system("touch ${General::swroot}/forward/config"); 
+                 chown 99,99,"${General::swroot}/forward/config";
+         }
+         if( -f "${General::swroot}/forward/input" ){ 
+                 unlink("${General::swroot}/forward/input");
+                 system("touch ${General::swroot}/forward/input"); 
+                 chown 99,99,"${General::swroot}/forward/input";
+         } 
          system("/usr/sbin/convert-outgoingfw");
-         rmtree("/var/ipfire/outgoing");
+         rmtree("${General::swroot}/outgoing");
+         system("/usr/local/bin/forwrdfwctrl");
   }
-  if( -d "/var/ipfire/xtaccess"){
+  if( -d "${General::swroot}/xtaccess"){
          system("/usr/sbin/convert-xtaccess");
-         rmtree("/var/ipfire/xtaccess");
+         rmtree("${General::swroot}/xtaccess");
   }
  }
 elsif ($ARGV[0] eq 'restoreaddon') {
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)