3 # vprocunhide sets vserver related attributes for /proc
5 # chkconfig: 2345 26 74
6 # description: Makes some /proc entries visibly for vservers
8 # if kernel not capable, exit early
9 if [ ! -d /proc/virtual ]; then
11 start|stop|restart|force-reload)
17 # Source function library.
18 . /etc/rc.d/init.d/functions
20 [ -n "$UTIL_VSERVER_VARS" ] || UTIL_VSERVER_VARS=/usr/lib/util-vserver/util-vserver-vars
21 if [ ! -e "$UTIL_VSERVER_VARS" ] ; then
22 echo "Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
25 . "$UTIL_VSERVER_VARS"
28 show "Fixing vservers /proc entries visibility"
30 ${_SETATTR} -Rx --hide /proc
39 [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/vprocunhide
43 show "Stopping vservers /proc entries visibility"
45 ${_SETATTR} -Rx --hide /proc
46 rm -f /var/lock/subsys/vprocunhide
62 if [ -f /var/lock/subsys/vprocunhide ] ; then
63 echo "vservers /proc entries were fixed"
65 echo "vservers /proc entries were not fixed"
69 msg_usage "$0 {start|stop|reload|restart|status}"