From: Enrico Scholz Date: Fri, 12 Mar 2004 03:01:18 +0000 (+0000) Subject: allow '--debug' in the destructors X-Git-Tag: VERSION_0_10~352 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d771a1039b7be40d461c7f1bec36aeaf904282ed;p=util-vserver.git allow '--debug' in the destructors git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1222 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/vserver.start b/util-vserver/scripts/vserver.start index 0e13331..3973e1a 100644 --- a/util-vserver/scripts/vserver.start +++ b/util-vserver/scripts/vserver.start @@ -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= diff --git a/util-vserver/scripts/vserver.stop b/util-vserver/scripts/vserver.stop index 8ebdf90..8dc7512 100644 --- a/util-vserver/scripts/vserver.stop +++ b/util-vserver/scripts/vserver.stop @@ -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