X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fvprocunhide;h=31c17f712f9cf2efbff8a0091b4fc6fbc9bc790e;hb=75385100bedf6d457e88bc2bb942a6f0771b0e06;hp=24a4a475266e023b3154be48a230a36f7c785b8c;hpb=da3d3725ce471cc67208d51e40f7a0a56d6a33a1;p=util-vserver.git diff --git a/util-vserver/scripts/vprocunhide b/util-vserver/scripts/vprocunhide index 24a4a47..31c17f7 100755 --- a/util-vserver/scripts/vprocunhide +++ b/util-vserver/scripts/vprocunhide @@ -1,4 +1,5 @@ #!/bin/bash +# $Id$ # # Copyright (C) 2004 Enrico Scholz # @@ -32,7 +33,7 @@ function showHelp() Return values: 0 ... no errors 1 ... configuration error - 2 ... some files where changes but there occured errors on other ones + 2 ... some files were changed but errors occured on other ones 3 ... operation failed on every file Report bugs to <$PACKAGE_BUGREPORT>." @@ -52,7 +53,7 @@ the GNU General Public License. This program has absolutely no warranty." } -while test "$1"; do +while test -n "$1"; do case "$1" in --help) showHelp;; --version) showVersion;; @@ -60,8 +61,8 @@ while test "$1"; do done findFile UNHIDEFILE \ - "$CONFDIR"/.defaults/apps/vprocunhide/files \ - "$PKGLIBDEFAULTDIR"/vprocunhide-files + "$__CONFDIR"/.defaults/apps/vprocunhide/files \ + "$__PKGLIBDEFAULTDIR"/vprocunhide-files ok=1 passed= @@ -70,8 +71,8 @@ while read filename; do case "$filename" in (\#*) continue;; + (\~*) params=( --admin --watch --hide ); filename=${filename#\~};; (-*) params=( --admin --hide ); filename=${filename#-};; - (~*) params=( --admin --watch --hide ); filename=${filename#~};; (:*) params=( --watch --hide ); filename=${filename#:};; (!*) params=( --hide ); filename=${filename#!};; (+*) params=( --!hide ); filename=${filename#+};; @@ -89,6 +90,6 @@ while read filename; do $_SETATTR -x "${params[@]}" "$@" && passed=1 || ok= done <"$UNHIDEFILE" -test "$ok" && exit 0 || \ -test "$passed" && exit 2 || \ +test -n "$ok" && exit 0 || \ +test -n "$passed" && exit 2 || \ exit 3