aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-09-21 14:00:44 -0400
committerBill Nottingham <notting@redhat.com>2009-09-21 14:00:44 -0400
commit281379a74c4a22c8c79cd62a90b07867bd9ccbdb (patch)
treed0c6b090fb3f67ae037c9b2e99e0068fbab43d32 /rc.d/init.d
parent7e8a81407d12d2b92f20de240d2a6c928ab41d8a (diff)
downloadinitscripts-281379a74c4a22c8c79cd62a90b07867bd9ccbdb.tar
initscripts-281379a74c4a22c8c79cd62a90b07867bd9ccbdb.tar.gz
initscripts-281379a74c4a22c8c79cd62a90b07867bd9ccbdb.tar.bz2
initscripts-281379a74c4a22c8c79cd62a90b07867bd9ccbdb.tar.xz
initscripts-281379a74c4a22c8c79cd62a90b07867bd9ccbdb.zip
Various initscript guideline fixes. (#524489)
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/network8
1 files changed, 5 insertions, 3 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 378bf84b..fa6c5b9e 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -57,6 +57,7 @@ rc=0
# See how we were called.
case "$1" in
start)
+ [ "$EUID" != "0" ] && exit 4
rc=0
# IPv6 hook (pre IPv4 start)
if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then
@@ -176,6 +177,7 @@ case "$1" in
[ -n "${NETWORKDELAY}" ] && /bin/sleep ${NETWORKDELAY}
;;
stop)
+ [ "$EUID" != "0" ] && exit 4
# Don't shut the network down if root is on NFS or a network
# block device.
rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/" && $3 != "rootfs") { print $3; }}' /proc/mounts)
@@ -283,14 +285,14 @@ case "$1" in
echo $"Currently active devices:"
echo $(/sbin/ip -o link show up | awk -F ": " '{ print $2 }')
;;
- restart|reload)
+ restart|reload|force-reload)
cd "$CWD"
$0 stop
$0 start
;;
*)
- echo $"Usage: $0 {start|stop|restart|reload|status}"
- exit 1
+ echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
+ exit 3
esac
exit $rc