3 # vprocunhide sets vserver related attributes for /proc
5 # chkconfig: 2345 26 74
6 # description: Makes some /proc entries visibly for vservers
8 # Source function library.
9 . /etc/rc.d/init.d/functions
11 [ -n "$UTIL_VSERVER_VARS" ] || UTIL_VSERVER_VARS=/usr/lib/util-vserver/util-vserver-vars
12 if [ ! -e "$UTIL_VSERVER_VARS" ] ; then
13 echo "Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
16 . "$UTIL_VSERVER_VARS"
20 if [ ! -d /proc/virtual ]; then
21 show "Fixing vservers /proc entries visibility. kernel not capable"
26 show "Fixing vservers /proc entries visibility"
28 ${_SETATTR} -Rx --hide /proc
37 [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/vprocunhide
40 show "Stopping vservers /proc entries visibility"
42 ${_SETATTR} -Rx --hide /proc
43 rm -f /var/lock/subsys/vprocunhide
51 if [ -f /var/lock/subsys/vprocunhide ] ; then
52 echo "vservers /proc entries were fixed"
54 echo "vservers /proc entries were not fixed"
58 echo "Usage: $0 {start|stop|reload|restart|status}"
65 # This must be last line !
66 # vi:syntax=sh:tw=78:ts=4:sw=4