From: Enrico Scholz Date: Tue, 1 Feb 2005 16:54:33 +0000 (+0000) Subject: vshelper.isDebug(): fixed it... X-Git-Tag: IPSENTINEL_VERSION_0_12~151 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8334c54794dfa8c6e71372e8670560bf4250940a;p=util-vserver.git vshelper.isDebug(): fixed it... git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1843 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/functions b/util-vserver/scripts/functions index c874b14..2cc3de0 100644 --- a/util-vserver/scripts/functions +++ b/util-vserver/scripts/functions @@ -739,13 +739,14 @@ function vshelper.isEnabled return 0 } -function vshelper.isDebug [] +## Usage: vshelper.isDebug [] +function vshelper.isDebug { test ! -e "$CONFDIR"/.defaults/apps/vshelper/debug || return 1 $_VSERVER_INFO - FEATURE vshelper || return 1 - if test -n "$2"; then - local appdir=$($_VSERVER_INFO "$2" APPDIR vshelper) || return 1 - test -z "$2" -o ! -e "$appdir/debug" || return 1 + if test -n "$1"; then + local appdir=$($_VSERVER_INFO "$1" APPDIR vshelper) || return 1 + test -z "$1" -o ! -e "$appdir/debug" || return 1 fi return 0