mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-16 09:55:54 +00:00
restore firewall config from backup
This commit is contained in:
parent
c05f7f3f40
commit
6738ab9c59
@ -5302,6 +5302,10 @@ sub restore_vma_archive {
|
|||||||
my $fh = IO::File->new($cfgfn, "r") ||
|
my $fh = IO::File->new($cfgfn, "r") ||
|
||||||
"unable to read qemu-server.conf - $!\n";
|
"unable to read qemu-server.conf - $!\n";
|
||||||
|
|
||||||
|
my $fwcfgfn = "$tmpdir/qemu-server.fw";
|
||||||
|
PVE::Tools::file_copy($fwcfgfn, "/etc/pve/firewall/$vmid.fw")
|
||||||
|
if -f $fwcfgfn;
|
||||||
|
|
||||||
while (defined(my $line = <$fh>)) {
|
while (defined(my $line = <$fh>)) {
|
||||||
if ($line =~ m/^\#qmdump\#map:(\S+):(\S+):(\S*):(\S*):$/) {
|
if ($line =~ m/^\#qmdump\#map:(\S+):(\S+):(\S*):(\S*):$/) {
|
||||||
my ($virtdev, $devname, $storeid, $format) = ($1, $2, $3, $4);
|
my ($virtdev, $devname, $storeid, $format) = ($1, $2, $3, $4);
|
||||||
|
Loading…
Reference in New Issue
Block a user