]> git.pld-linux.org Git - packages/util-vserver.git/blobdiff - vprocunhide.init
- release 2 (by relup.sh)
[packages/util-vserver.git] / vprocunhide.init
old mode 100644 (file)
new mode 100755 (executable)
index 936b4ef..9ae34b7
@@ -8,7 +8,7 @@
 # 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
@@ -17,17 +17,18 @@ fi
 # 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
@@ -42,26 +43,25 @@ start() {
 stop() {
        show "Stopping vservers /proc entries visibility"
        busy
-       ${_SETATTR} -Rx --hide /proc
        rm -f /var/lock/subsys/vprocunhide
        ok
 }
 
 case "$1" in
-start|restart|reload)
+  start|restart|reload)
        start
        ;;
-stop)
+  stop)
        stop
        ;;
-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
        ;;
This page took 0.21841 seconds and 4 git commands to generate.