From c810138f2bdd99e2645334b23edbe579d36ec24f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sat, 22 Nov 2008 17:01:41 +0000 Subject: [PATCH 1/1] - a correct solution, use ls and egrep (in case of empty dir glob will expand according to current dir) Changed files: util-vserver.init -> 1.3 --- util-vserver.init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util-vserver.init b/util-vserver.init index ef1e78b..c297b40 100644 --- a/util-vserver.init +++ b/util-vserver.init @@ -32,14 +32,14 @@ stop() { run_cmd "Stopping all running guests" $_START_VSERVERS -j 1 --all --stop - xids=$(cd /proc/virtual ; ls [0-9]* 2>/dev/null) + xids=$(cd /proc/virtual ; ls -1 | egrep -v 'info|status') if [ -n "$xids" ]; then show "Sending all contexts the TERM signal" for xid in $xids; do $_VATTRIBUTE --xid $xid --set --flag ~persistent $_VKILL --xid $xid -s 15 done - xids=$(cd /proc/virtual ; ls [0-9]* 2>/dev/null) + xids=$(cd /proc/virtual ; ls -1 | egrep -v 'info|status') if [ -n "$xids" ]; then fail else @@ -53,7 +53,7 @@ stop() $_VATTRIBUTE --xid $xid --set --flag ~persistent $_VKILL --xid $xid -s 9 done - xids=$(cd /proc/virtual ; ls [0-9]* 2>/dev/null) + xids=$(cd /proc/virtual ; ls -1 | egrep -v 'info|status') if [ -n "$xids" ]; then fail else -- 2.44.0