SOURCES: rusersd.init - use functions
glen
glen at pld-linux.org
Thu Mar 29 18:35:36 CEST 2007
Author: glen Date: Thu Mar 29 16:35:36 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
rusersd.init (1.12 -> 1.13)
---- Diffs:
================================================================
Index: SOURCES/rusersd.init
diff -u SOURCES/rusersd.init:1.12 SOURCES/rusersd.init:1.13
--- SOURCES/rusersd.init:1.12 Thu Dec 8 02:02:49 2005
+++ SOURCES/rusersd.init Thu Mar 29 18:35:31 2007
@@ -24,10 +24,7 @@
# Get rusersd config
[ -f /etc/sysconfig/rusersd ] && . /etc/sysconfig/rusersd
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/rusersd ]; then
msg_starting rusers
@@ -37,8 +34,9 @@
else
msg_already_running rusersd
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/rusersd ]; then
msg_stopping rpc.rusersd
killproc rpc.rusersd
@@ -46,15 +44,24 @@
else
msg_not_running rusersd
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
status)
status rpc.rusersd
exit $?
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
*)
msg_usage "$0 {start|stop|restart|force-reload|status}"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/rusersd.init?r1=1.12&r2=1.13&f=u
More information about the pld-cvs-commit
mailing list