If a rename fails, the CT should not mark as a template.
my $realcmd = sub {
PVE::LXC::template_create($vmid, $conf);
my $realcmd = sub {
PVE::LXC::template_create($vmid, $conf);
- PVE::LXC::Config->write_config($vmid, $conf);
- # and remove lxc config
- PVE::LXC::update_lxc_config($vmid, $conf);
+ PVE::LXC::Config->write_config($vmid, $conf);
+ # and remove lxc config
+ PVE::LXC::update_lxc_config($vmid, $conf);
+ };
return $rpcenv->fork_worker('vztemplate', $vmid, $authuser, $realcmd);
};
return $rpcenv->fork_worker('vztemplate', $vmid, $authuser, $realcmd);
};