# if kernel not capable, exit early
if [ ! -d /proc/virtual ]; then
case "$1" in
- start|stop|restart|force-reload)
+ start|stop|reload|restart)
exit 0
;;
esac
# Source function library.
. /etc/rc.d/init.d/functions
-[ -n "$UTIL_VSERVER_VARS" ] || UTIL_VSERVER_VARS=/usr/lib/util-vserver/util-vserver-vars
+[ -n "$UTIL_VSERVER_VARS" ] || UTIL_VSERVER_VARS=/usr/share/util-vserver/util-vserver-vars
if [ ! -e "$UTIL_VSERVER_VARS" ] ; then
echo "Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
exit 1
fi
. "$UTIL_VSERVER_VARS"
+$_VSERVER_INFO - FEATURE iattr || exit 0
+
start() {
show "Fixing vservers /proc entries visibility"
busy
- ${_SETATTR} -Rx --hide /proc
$_VPROCUNHIDE
RETVAL=$?
deltext
stop() {
show "Stopping vservers /proc entries visibility"
busy
- ${_SETATTR} -Rx --hide /proc
rm -f /var/lock/subsys/vprocunhide
ok
}
case "$1" in
-start)
+ start|restart|reload)
start
;;
-stop)
- stop
- ;;
-restart|reload)
+ stop)
stop
- start
;;
-status)
- if [ -f /var/lock/subsys/vprocunhide ] ; then
+ status)
+ if [ -f /var/lock/subsys/vprocunhide ]; then
echo "vservers /proc entries were fixed"
else
echo "vservers /proc entries were not fixed"
fi
;;
-*)
+ *)
msg_usage "$0 {start|stop|reload|restart|status}"
exit 3
;;