SOURCES: dhcdbd.init - use functions
glen
glen at pld-linux.org
Sun Apr 27 03:40:44 CEST 2008
Author: glen Date: Sun Apr 27 01:40:44 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
dhcdbd.init (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SOURCES/dhcdbd.init
diff -u SOURCES/dhcdbd.init:1.4 SOURCES/dhcdbd.init:1.5
--- SOURCES/dhcdbd.init:1.4 Sun Apr 27 03:39:12 2008
+++ SOURCES/dhcdbd.init Sun Apr 27 03:40:38 2008
@@ -9,7 +9,8 @@
# processname: dhcdbd
# pidfile: /var/run/dhcdbd.pid
# config: /etc/dbus-1/system.d/dhcdbd.conf
-
+#
+# $Id$
# Source function library
. /etc/rc.d/init.d/functions
@@ -30,10 +31,7 @@
exit 0
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
if [ -f /var/lock/subsys/messagebus ]; then
if [ ! -f /var/lock/subsys/dhcdbd ]; then
msg_starting dhcdbd
@@ -46,8 +44,9 @@
else
msg_not_running messagebus
fi
- ;;
- stop)
+}
+
+stop() {
msg_stopping dhcdbd
if [ -f /var/run/dhcdbd.pid ]; then
checkpid `cat /var/run/dhcdbd.pid` >/dev/null 2>&1
@@ -77,6 +76,20 @@
else
msg_not_running messagebus
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
;;
status)
status dhcdbd
@@ -98,10 +111,6 @@
fi
fi
;;
- restart)
- $0 stop
- $0 start
- ;;
*)
msg_usage "$0 {start|stop|restart|status}"
exit 3
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/dhcdbd.init?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list