SOURCES: rpcidmapd.init - use functions
glen
glen at pld-linux.org
Thu Apr 5 09:07:42 CEST 2007
Author: glen Date: Thu Apr 5 07:07:42 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
rpcidmapd.init (1.6 -> 1.7)
---- Diffs:
================================================================
Index: SOURCES/rpcidmapd.init
diff -u SOURCES/rpcidmapd.init:1.6 SOURCES/rpcidmapd.init:1.7
--- SOURCES/rpcidmapd.init:1.6 Wed Apr 4 23:31:38 2007
+++ SOURCES/rpcidmapd.init Thu Apr 5 09:07:36 2007
@@ -38,11 +38,7 @@
# Find out what the current runlevel dir is
RUNLEVELDIR=$(cat /var/run/runlevel.dir)
-RETVAL=0
-
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/idmapd ]; then
# This is whacko, but we need /proc/fs/nfsd mounted before
@@ -66,8 +62,9 @@
else
msg_already_running "RPC idmapd"
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/idmapd ]; then
msg_stopping "RPC idmapd"
killproc rpc.idmapd
@@ -75,15 +72,24 @@
else
msg_not_running "RPC idmapd"
fi
+}
+
+# See how we were called.
+RETVAL=0
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
status)
status rpc.idmapd
RETVAL=$?
;;
restart)
- $0 stop
- $0 start
- RETVAL=$?
+ stop
+ start
;;
reload)
if [ -f /var/lock/subsys/idmapd ]; then
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/rpcidmapd.init?r1=1.6&r2=1.7&f=u
More information about the pld-cvs-commit
mailing list