vshelper.isDebug(): fixed logic
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 12 Apr 2005 18:26:56 +0000 (18:26 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 12 Apr 2005 18:26:56 +0000 (18:26 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2019 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/functions

index 1aafeae..2aa5e02 100644 (file)
@@ -746,7 +746,7 @@ To fix this, you can:"
 function vshelper.isEnabled
 {
     local f=${1:+$1-}disabled
-    test ! -e "$__CONFDIR"/.defaults/apps/vshelper/"$f"       || return 1
+    test ! -e "$__CONFDIR"/.defaults/apps/vshelper/"$f"     || return 1
     $_VSERVER_INFO - FEATURE vshelper                       || return 1
     if test -n "$2"; then
        local appdir
@@ -760,15 +760,15 @@ function vshelper.isEnabled
 ## Usage: vshelper.isDebug [<vserver>]
 function vshelper.isDebug
 {
-    test ! -e "$__CONFDIR"/.defaults/apps/vshelper/debug           || return 1
+    test ! -e "$__CONFDIR"/.defaults/apps/vshelper/debug    || return 0
     $_VSERVER_INFO - FEATURE vshelper                       || return 1
     if test -n "$1"; then
        local appdir
        appdir=$($_VSERVER_INFO "$1" APPDIR vshelper)       || return 1
-       test -z "$1" -o ! -e "$appdir/debug"                || return 1
+       test ! -e "$appdir/debug"                           || return 0
     fi
 
-    return 0
+    return 1
 }
 
 function vshelper._getHandlerInternal