SOURCES: messagebus.init - use functions, fix force-reload
glen
glen at pld-linux.org
Sun Oct 1 23:58:56 CEST 2006
Author: glen Date: Sun Oct 1 21:58:56 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions, fix force-reload
---- Files affected:
SOURCES:
messagebus.init (1.7 -> 1.8)
---- Diffs:
================================================================
Index: SOURCES/messagebus.init
diff -u SOURCES/messagebus.init:1.7 SOURCES/messagebus.init:1.8
--- SOURCES/messagebus.init:1.7 Sun Sep 17 18:17:31 2006
+++ SOURCES/messagebus.init Sun Oct 1 23:58:51 2006
@@ -25,10 +25,7 @@
exit 0
fi
-
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/messagebus ]; then
msg_starting messagebus
@@ -38,8 +35,9 @@
else
msg_already_running messagebus
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/messagebus ]; then
# Stop daemons.
msg_stopping messagebus
@@ -49,13 +47,21 @@
else
msg_not_running messagebus
fi
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
- reload)
+ reload|force-reload)
if [ -f /var/lock/subsys/messagebus ]; then
msg_reloading messagebus
killproc dbus-daemon -HUP
@@ -65,15 +71,6 @@
RETVAL=7
fi
;;
- force-reload)
- # if program allows reloading without stopping
- $0 reload
-
- # or if it doesn't
- $0 restart
-
- exit $?
- ;;
status)
status messagebus dbus-daemon
RETVAL=$?
@@ -86,4 +83,3 @@
exit $RETVAL
# This must be last line !
-# vi:syntax=sh:tw=78:ts=8:sw=4
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/messagebus.init?r1=1.7&r2=1.8&f=u
More information about the pld-cvs-commit
mailing list