X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sysv%2Futil-vserver;h=047ef45dd70eb8e3de50d350a0f5547e332da42d;hb=82a9b690cda21ee4545b8a60b6473eaafde73e9b;hp=8e54016107a875faa1d51bbfe4345bd51321597e;hpb=6860ee7b75b17e1ae7d8e3b8e9aadecfca4a08ca;p=util-vserver.git diff --git a/sysv/util-vserver b/sysv/util-vserver index 8e54016..047ef45 100755 --- a/sysv/util-vserver +++ b/sysv/util-vserver @@ -29,6 +29,7 @@ function set_helper() function kill_contexts() { + local xid for xid in `ls -1 /proc/virtual`; do test "$xid" = "info" -o "$xid" = "status" && continue $_VATTRIBUTE --xid $xid --set --flag ~persistent @@ -36,6 +37,12 @@ function kill_contexts() sleep 3 $_VKILL --xid $xid -s 9 done + local alive=0 + for xid in `ls -1 /proc/virtual`; do + test "$xid" = "info" -o "$xid" = "status" && continue + let alive+=1 + done + test $alive = 0 } function start()