my $vollist = [];
eval {
my $orig_mp_param; # only used if $restore
- my $orig_conf;
if ($restore) {
die "can't overwrite running container\n" if PVE::LXC::check_running($vmid);
if ($is_root && $archive ne '-') {
+ my $orig_conf;
($orig_conf, $orig_mp_param) = PVE::LXC::Create::recover_config($archive);
# When we're root call 'restore_configuration' with ristricted=0,
# causing it to restore the raw lxc entries, among which there may be
}
if ($storage_only_mode) {
if ($restore) {
- if (!defined $orig_mp_param) {
+ if (!defined($orig_mp_param)) {
(undef, $orig_mp_param) = PVE::LXC::Create::recover_config($archive);
}
$mp_param = $orig_mp_param;