SOURCES: vixie-cron.init - use functions to avoid reexec for restart
glen
glen at pld-linux.org
Sun Sep 17 19:03:11 CEST 2006
Author: glen Date: Sun Sep 17 17:03:11 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions to avoid reexec for restart
---- Files affected:
SOURCES:
vixie-cron.init (1.16 -> 1.17)
---- Diffs:
================================================================
Index: SOURCES/vixie-cron.init
diff -u SOURCES/vixie-cron.init:1.16 SOURCES/vixie-cron.init:1.17
--- SOURCES/vixie-cron.init:1.16 Sun Sep 17 18:17:31 2006
+++ SOURCES/vixie-cron.init Sun Sep 17 19:03:05 2006
@@ -37,10 +37,7 @@
# Get service config
[ -f /etc/sysconfig/cron ] && . /etc/sysconfig/cron
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/crond ]; then
msg_starting "Vixie cron"
@@ -50,8 +47,9 @@
else
msg_already_running "Vixie cron"
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/crond ]; then
msg_stopping "Vixie cron"
killproc crond
@@ -59,15 +57,24 @@
else
msg_not_running "Vixie cron"
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
status)
status crond
exit $?
;;
restart)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
reload|force-reload)
if [ -f /var/lock/subsys/crond ]; then
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/vixie-cron.init?r1=1.16&r2=1.17&f=u
More information about the pld-cvs-commit
mailing list