Merge branch 'master' into fifteen
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Jan 2014 12:31:25 +0000 (13:31 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Jan 2014 12:31:25 +0000 (13:31 +0100)
Conflicts:
config/backup/backup.pl

1  2 
config/backup/backup.pl
config/rootfiles/common/stage2
html/cgi-bin/ovpnmain.cgi

@@@ -64,67 -64,10 +64,71 @@@ 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");
 +  #OUTGOINGFW CONVERTER
 +  if( -d "${General::swroot}/outgoing"){
 +        if( -f "${General::swroot}/firewall/config" ){
 +                unlink("${General::swroot}/firewall/config");
 +                system("touch ${General::swroot}/firewall/config");
 +                chown 99,99,"${General::swroot}/firewall/config";
 +        }
 +        if( -f "${General::swroot}/firewall/outgoing" ){
 +                unlink("${General::swroot}/firewall/outgoing");
 +                system("touch ${General::swroot}/firewall/outgoing");
 +                chown 99,99,"${General::swroot}/firewall/outgoing";
 +        }
 +        unlink("${General::swroot}/fwhosts/customgroups");
 +        unlink("${General::swroot}/fwhosts/customhosts");
 +        unlink("${General::swroot}/fwhosts/customgroups");
 +        unlink("${General::swroot}/fwhosts/customnetworks");
 +        unlink("${General::swroot}/fwhosts/customservicegrp");
 +        unlink("${General::swroot}/fwhosts/customnetworks");
 +        system("touch ${General::swroot}/fwhosts/customgroups");
 +        system("touch ${General::swroot}/fwhosts/customhosts");
 +        system("touch ${General::swroot}/fwhosts/customnetworks");
 +        system("touch ${General::swroot}/fwhosts/customservicegrp");
 +        #START CONVERTER "OUTGOINGFW"
 +        system("/usr/sbin/convert-outgoingfw");
 +        chown 99,99,"${General::swroot}/fwhosts/customgroups";
 +        chown 99,99,"${General::swroot}/fwhosts/customhosts";
 +        chown 99,99,"${General::swroot}/fwhosts/customnetworks";
 +        chown 99,99,"${General::swroot}/fwhosts/customservicegrp";
 +        #START CONVERTER "OUTGOINGFW"
 +        rmtree("${General::swroot}/outgoing");
 +  }
 +  #XTACCESS CONVERTER
 +  if( -d "${General::swroot}/xtaccess"){
 +        if( -f "${General::swroot}/firewall/input" ){
 +                unlink("${General::swroot}/firewall/input");
 +                system("touch ${General::swroot}/firewall/input");
 +        }
 +        #START CONVERTER "XTACCESS"
 +        system("/usr/sbin/convert-xtaccess");
 +        chown 99,99,"${General::swroot}/firewall/input";
 +        rmtree("${General::swroot}/xtaccess");
 +  }
 +  #DMZ-HOLES CONVERTER
 +  if( -d "${General::swroot}/dmzholes" || -d "${General::swroot}/portfw"){
 +        if( -f "${General::swroot}/firewall/config" ){
 +                unlink("${General::swroot}/firewall/config");
 +                system("touch ${General::swroot}/firewall/config");
 +        }
 +        #START CONVERTER "DMZ-HOLES"
 +        system("/usr/sbin/convert-dmz");
 +        chown 99,99,"${General::swroot}/firewall/config";
 +        rmtree("${General::swroot}/dmzholes");
 +  }
 +  #PORTFORWARD CONVERTER
 +  if( -d "${General::swroot}/portfw"){
 +      #START CONVERTER "PORTFW"
 +      system("/usr/sbin/convert-portfw");
 +      rmtree("${General::swroot}/portfw");
 +  }
 +  system("/usr/local/bin/firewallctrl");
 + }
+   # Convert old OpenVPN CCD files (CN change, core 75).
+   system("/usr/local/bin/convert-ovpn");
+ }
  elsif ($ARGV[0] eq 'restoreaddon') {
    if ( -e "/tmp/$ARGV[1]" ){system("mv /tmp/$ARGV[1] /var/ipfire/backup/addons/backup/$ARGV[1]");}
    system("cd / && tar -xvz -p -f /var/ipfire/backup/addons/backup/$ARGV[1]");
Simple merge
Simple merge