]> git.proxmox.com Git - pve-container.git/commitdiff
cleanup OVZ config recovery
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 21 Apr 2016 07:19:02 +0000 (09:19 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 21 Apr 2016 07:30:13 +0000 (09:30 +0200)
$conf->{rootfs} is supposed to be the property string value,
not the parsed property string. since this method is called
only twice (once for retrieving the rootfs information only,
once for retrieving the config only) and the second call
never needs the 'rootfs' part of the configuration, we can
safely not set it instead of introducing ugly workarounds
(e.g. setting a fake volume path or worse).

src/PVE/VZDump/ConvertOVZ.pm

index 35fbd70ffe55be8057d85355e7bdbc33423b6829..8942453a16be5b225ecfa5a21d511792e2216fc1 100644 (file)
@@ -314,7 +314,7 @@ sub convert_ovz {
 
    $conf->{hostname} = $ovz_conf->{hostname}->{value};
 
-   $conf->{rootfs} = { size => $disksize, mp => '/' };
+   my $rootfsinfo = { size => $disksize, mp => '/' };
 
-   return wantarray ? ($conf, $conf->{rootfs}) : $conf;
+   return wantarray ? ($conf, $rootfsinfo) : $conf;
 }