Be silent if it's not a Linux-VServer kernel.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 17 Jul 2008 14:53:03 +0000 (14:53 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 17 Jul 2008 14:53:03 +0000 (14:53 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2749 94cd875c-1c1d-0410-91d2-eb244daf1a30

sysv/util-vserver

index d56dadc..4374143 100755 (executable)
@@ -32,7 +32,7 @@ function set_helper()
 function kill_contexts()
 {
     local xid
-    for xid in `ls -1 /proc/virtual`; do
+    for xid in `ls -1 /proc/virtual 2>/dev/null`; do
        test "$xid" = "info" -o "$xid" = "status" && continue
        $_VATTRIBUTE --xid $xid --set --flag ~persistent
        $_VKILL --xid $xid -s 15
@@ -40,7 +40,7 @@ function kill_contexts()
        $_VKILL --xid $xid -s 9
     done
     local alive=0
-    for xid in `ls -1 /proc/virtual`; do
+    for xid in `ls -1 /proc/virtual 2>/dev/null`; do
        test "$xid" = "info" -o "$xid" = "status" && continue
        let alive+=1
     done