#
# chkconfig: 2345 26 74
# description: Makes some /proc entries visibly for vservers
+#
+### BEGIN INIT INFO
+# Provides: vprocunhide
+# Required-Start: $remote_fs $syslog $time
+# Required-Stop: $remote_fs $syslog $time
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: vprocunhide sets vserver related attributes for /proc
+# Description: vprocunhide sets vserver related attributes for /proc.
+### END INIT INFO
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
$_VSERVER_INFO - FEATURE iattr || exit 0
-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=vprocunhide
+. "$_LIB_VSERVER_INIT_FUNCTIONS"
function start()
{
- echo -n $"Fixing /proc entries visibility..."
+ _beginResult $"Fixing /proc entries visibility"
$_VPROCUNHIDE
- retval=$?
- case "$retval" in
- 0) success;;
- 2) passed; retval=0;;
- *) failure;
- esac
- echo
+ _endResult $?
+ local retval=$?
test "$retval" -ne 0 || touch "$lockfile"
return $retval
}
function stop()
{
- rm -f "$lockfile"
+ $_RM -f "$lockfile"
}
function restart()