Fix vserver ... stop --rescue-init.
[util-vserver.git] / scripts / vserver-build.functions
index f615cad..3e2b4f9 100644 (file)
@@ -269,7 +269,11 @@ function startSleepingGuest
        exec  > /dev/null
        exec 2> /dev/null
        trap 'kill -s 9 -- -1; exit 0' INT
-       sleep $timeout
+       i=0
+       while [ \$i -lt $timeout ]; do
+           sleep 1
+           let ++i
+       done
        kill -s 15 -- -1
        sleep 1
        kill -s 9 -- -1"
@@ -278,5 +282,5 @@ function startSleepingGuest
 function stopSleepingGuest
 {
     local guest="$1"
-    $_VKILL --xid "$guest" -s INT -- 0
+    $_VSERVER "$guest" stop --rescue-init
 }