Commit 495c33c8 by Christian Seiler Committed by Stéphane Graber

Properly handle timeout case in lxc-shutdown

parent 7f145a6d
......@@ -28,6 +28,7 @@ usage() {
}
alarm() {
trap 'exit 0' TERM
pid=$1
timeout=$2
sleep $timeout
......@@ -139,6 +140,7 @@ while ! lxc-info -n $lxc_name --state-is STOPPED; do
done
if [ $timeout != "-1" ]; then
trap - EXIT
kill $alarmpid
fi
......
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