[pve-devel] [PATCH container 2/4] Use run_command instead of system to stop CT
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Feb 23 15:00:12 CET 2016
---
src/PVE/LXC.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 5172a55..4ba9125 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -2134,7 +2134,8 @@ sub snapshot_rollback {
if ($prepare) {
check_lock($conf);
- system("lxc-stop -n $vmid --kill") if check_running($vmid);
+ PVE::Tools::run_command(['/usr/bin/lxc-stop', '-n', $vmid, '--kill'])
+ if check_running($vmid);
}
die "unable to rollback vm $vmid: vm is running\n"
--
2.1.4
More information about the pve-devel
mailing list