aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-09-21 13:54:37 -0400
committerBill Nottingham <notting@redhat.com>2009-09-21 13:54:37 -0400
commit7e8a81407d12d2b92f20de240d2a6c928ab41d8a (patch)
tree8882a22ef56731f1ee3de73f5ec0344ffa788478 /rc.d
parent709ef82796b5340fd286f1416ee967ac8c1979f8 (diff)
downloadinitscripts-7e8a81407d12d2b92f20de240d2a6c928ab41d8a.tar
initscripts-7e8a81407d12d2b92f20de240d2a6c928ab41d8a.tar.gz
initscripts-7e8a81407d12d2b92f20de240d2a6c928ab41d8a.tar.bz2
initscripts-7e8a81407d12d2b92f20de240d2a6c928ab41d8a.tar.xz
initscripts-7e8a81407d12d2b92f20de240d2a6c928ab41d8a.zip
Various initscript standard changes. (#524486)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/netfs6
1 files changed, 4 insertions, 2 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index 302f2e61..27de3619 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -33,6 +33,7 @@ NETDEVMTAB=$(LC_ALL=C awk '$4 ~ /_netdev/ && $2 != "/" { print $2 }' /etc/mtab)
case "$1" in
start)
[ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0
+ [ "$EUID" != "0" ] && exit 4
[ -n "$NFSFSTAB" ] &&
{
[ ! -f /var/lock/subsys/rpcbind ] && service rpcbind start
@@ -96,6 +97,7 @@ case "$1" in
;;
stop)
# Unmount loopback stuff first
+ [ "$EUID" != "0" ] && exit 4
__umount_loopback_loop
if [ -n "$NETDEVMTAB" ]; then
__umount_loop '$4 ~ /_netdev/ && $2 != "/" {print $2}' \
@@ -151,7 +153,7 @@ case "$1" in
else
echo $"/proc filesystem unavailable"
fi
- [ -r /var/lock/subsys/netfs ] || exit 2
+ [ -r /var/lock/subsys/netfs ] || exit 3
;;
restart)
$0 stop
@@ -162,7 +164,7 @@ case "$1" in
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
- exit 1
+ exit 3
esac
exit 0