Commit d1252b84 by Serge Hallyn Committed by Daniel Lezcano

lxc-destroy: wait until the container is stopped

parent b505cccf
...@@ -99,6 +99,7 @@ lxc-info -n $lxc_name 2>/dev/null | grep -q RUNNING ...@@ -99,6 +99,7 @@ lxc-info -n $lxc_name 2>/dev/null | grep -q RUNNING
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
if [ $force -eq 1 ]; then if [ $force -eq 1 ]; then
lxc-stop -n $lxc_name lxc-stop -n $lxc_name
lxc-wait -n $lxc_name -s STOPPED
else else
echo "$(basename $0): '$lxc_name' is running; aborted" >&2 echo "$(basename $0): '$lxc_name' is running; aborted" >&2
exit 1 exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment