SOURCES: mopd.init - use functions
glen
glen at pld-linux.org
Wed Feb 14 23:10:07 CET 2007
Author: glen Date: Wed Feb 14 22:10:07 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
mopd.init (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/mopd.init
diff -u SOURCES/mopd.init:1.2 SOURCES/mopd.init:1.3
--- SOURCES/mopd.init:1.2 Wed Feb 14 19:47:18 2007
+++ SOURCES/mopd.init Wed Feb 14 23:10:02 2007
@@ -22,10 +22,7 @@
exit 0
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/mopd ]; then
msg_starting MOPD
@@ -35,8 +32,9 @@
else
msg_already_running MOPD
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/mopd ]; then
msg_stopping MOPD
killproc mopd
@@ -44,11 +42,20 @@
else
msg_not_running MOPD
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart|reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
status)
status mopd
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/mopd.init?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list