[pve-devel] [PATCH pve-container 2/2] restore firwall settings if they exist in tar

Wolfgang Link w.link at proxmox.com
Fri Nov 20 08:41:52 CET 2015


on LXC restore import firewall settings
---
 src/PVE/LXC/Create.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm
index 58db2d2..cac7ec2 100644
--- a/src/PVE/LXC/Create.pm
+++ b/src/PVE/LXC/Create.pm
@@ -155,6 +155,8 @@ sub restore_and_configure {
 		$conf->{$key} = $oldconf->{$key} if !defined($conf->{$key});
 	    }
 	    unlink($pct_cfg_fn);
+
+	    File::Copy::copy("$rootdir/etc/vzdump/firewall.fw", "/etc/pve/firewall/$vmid.fw");
 	    
 	} elsif (-f $ovz_cfg_fn) {
 	    print "###########################################################\n";
-- 
2.1.4




More information about the pve-devel mailing list