allow '--debug' in the destructors
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 12 Mar 2004 03:01:18 +0000 (03:01 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 12 Mar 2004 03:01:18 +0000 (03:01 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1222 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/vserver.start
util-vserver/scripts/vserver.stop

index 0e13331..3973e1a 100644 (file)
@@ -22,9 +22,10 @@ fi
 
 function cleanup()
 {
+    test    "$OPTION_DEBUG"    || exec 2>/dev/null >/dev/null
     test -z "$is_started"      || return 0
-    test -z "$is_mounted"      || umountVserver     "$VSERVER_DIR" &>/dev/null || :
-    test -z "$have_interfaces" || disableInterfaces "$VSERVER_DIR" &>/dev/null || :
+    test -z "$is_mounted"      || umountVserver     "$VSERVER_DIR" || :
+    test -z "$have_interfaces" || disableInterfaces "$VSERVER_DIR" || :
 }
 
 is_started=
index 8ebdf90..8dc7512 100644 (file)
@@ -17,8 +17,9 @@
 
 if ! isVserverRunning "$VSERVER_DIR" S_CONTEXT; then
     echo $"vserver '$VSERVER_NAME' is not running; aborting..." >&2
-    umountVserver     "$VSERVER_DIR" &>/dev/null || :
-    disableInterfaces "$VSERVER_DIR" &>/dev/null || :
+    test "$OPTION_DEBUG" || exec 2>/dev/null >/dev/null
+    umountVserver     "$VSERVER_DIR" || :
+    disableInterfaces "$VSERVER_DIR" || :
     exit 1
 fi