]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxc-destroy: wait until the container is stopped
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 31 Jul 2012 14:04:33 +0000 (16:04 +0200)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Tue, 31 Jul 2012 14:04:33 +0000 (16:04 +0200)
Signed-off-by: Timothy Chen <tnachen@gmail.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc-destroy.in

index 76cad8637abb432a3a9d16463424fd12180e360f..aa9473bece799925bfbe74f9fec32b39409fb554 100644 (file)
@@ -99,6 +99,7 @@ lxc-info -n $lxc_name 2>/dev/null | grep -q RUNNING
 if [ $? -eq 0 ]; then
        if [ $force -eq 1 ]; then
                lxc-stop -n $lxc_name
+               lxc-wait -n $lxc_name -s STOPPED
        else
                echo "$(basename $0): '$lxc_name' is running; aborted" >&2
                exit 1