X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fsysv%2Fvprocunhide;h=0d38193bf85e27b7f16fe6d12f509450c02d216e;hb=75de7ac21731b972fb4a423325642066a2ee03f5;hp=44665a1c69ecac4a6ec1fd3e1d24455ac4f02f9e;hpb=a618550496d51843a5cb276e3cffa16ab103d9d0;p=util-vserver.git diff --git a/util-vserver/sysv/vprocunhide b/util-vserver/sysv/vprocunhide index 44665a1..0d38193 100755 --- a/util-vserver/sysv/vprocunhide +++ b/util-vserver/sysv/vprocunhide @@ -7,29 +7,36 @@ : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} test -e "$UTIL_VSERVER_VARS" || { - echo $"Can not find util-vserver installation; aborting...">&2 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 exit 1 } . "$UTIL_VSERVER_VARS" -# Source function library. -. /etc/rc.d/init.d/functions +f=/etc/rc.d/init.d/functions +if test -e "$f"; then + . "$f" + lockfile=/var/lock/subsys/vprocunhide +else + success() { echo .; } + passed() { echo .; } + failure() { echo ERROR; } + lockfile=/var/run/vprocunhide +fi -lockfile=/var/lock/subsys/vprocunhide function start() { echo -n $"Fixing /proc entries visibility..." $_VPROCUNHIDE - rc=$? - case "$rc" in + retval=$? + case "$retval" in 0) success;; - 2) rc=0; passed;; + 2) passed; retval=0;; *) failure; esac echo - test "$rc" -ne 0 || touch "$lockfile" - return $rc + test "$retval" -ne 0 || touch "$lockfile" + return $retval } function stop() @@ -62,5 +69,3 @@ case "$1" in exit 2 ;; esac - -