SOURCES: pld-builder.init - use functions
glen
glen at pld-linux.org
Wed Jun 25 23:06:09 CEST 2008
Author: glen Date: Wed Jun 25 21:06:09 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
pld-builder.init (1.5 -> 1.6)
---- Diffs:
================================================================
Index: SOURCES/pld-builder.init
diff -u SOURCES/pld-builder.init:1.5 SOURCES/pld-builder.init:1.6
--- SOURCES/pld-builder.init:1.5 Tue May 30 13:40:40 2006
+++ SOURCES/pld-builder.init Wed Jun 25 23:06:04 2008
@@ -20,9 +20,7 @@
# Get service config - may override defaults
[ -f /etc/sysconfig/pld-builder ] && . /etc/sysconfig/pld-builder
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/pld-builder ]; then
msg_starting pld-builder
@@ -33,8 +31,9 @@
else
msg_already_running pld-builder
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/pld-builder ]; then
# Stop daemons.
msg_stopping pld-builder
@@ -45,10 +44,19 @@
else
msg_not_running pld-builder
fi
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart)
- $0 stop
- $0 start
+ stop
+ start
exit $?
;;
reload)
@@ -83,6 +91,3 @@
unset -f pld_builder_stop
exit $RETVAL
-
-# This must be last line !
-# vi:syntax=sh
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pld-builder.init?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list