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|reload|restart)
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 2>/dev/null
39 [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/vprocunhide
43 # XXX why start and stop both do --hide?
44 show "Stopping vservers /proc entries visibility"
46 ${_SETATTR} -Rx --hide /proc 2>/dev/null
47 rm -f /var/lock/subsys/vprocunhide
59 if [ -f /var/lock/subsys/vprocunhide ] ; then
60 echo "vservers /proc entries were fixed"
62 echo "vservers /proc entries were not fixed"
66 msg_usage "$0 {start|stop|reload|restart|status}"