use $(LIBENSCVECTOR) instead of libensc_vector.a
[util-vserver.git] / util-vserver / sysv / vprocunhide
index 44665a1..0d38193 100755 (executable)
@@ -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
-
-