SOURCES: ntp.init - add try-restart
glen
glen at pld-linux.org
Sun Apr 27 02:47:49 CEST 2008
Author: glen Date: Sun Apr 27 00:47:49 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- add try-restart
---- Files affected:
SOURCES:
ntp.init (1.24 -> 1.25)
---- Diffs:
================================================================
Index: SOURCES/ntp.init
diff -u SOURCES/ntp.init:1.24 SOURCES/ntp.init:1.25
--- SOURCES/ntp.init:1.24 Sun Apr 27 02:43:58 2008
+++ SOURCES/ntp.init Sun Apr 27 02:47:44 2008
@@ -49,6 +49,16 @@
fi
}
+condrestart() {
+ if [ -f /var/lock/subsys/ntpd ]; then
+ stop
+ start
+ else
+ msg_not_running ntpd
+ RETVAL=$1
+ fi
+}
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -58,23 +68,23 @@
stop)
stop
;;
+ restart)
+ stop
+ start
+ ;;
+ # NB! don't remove 'condrestart': dhcpcd calls this
+ try-restart|condrestart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
status)
status ntpd
exit $?
;;
- restart|force-reload)
- stop
- start
- ;;
- condrestart)
- # NB! don't remove: dhcpcd calls this
- if [ -f /var/lock/subsys/ntpd ]; then
- stop
- start
- fi
- ;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|condrestart|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|condrestart|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/ntp.init?r1=1.24&r2=1.25&f=u
More information about the pld-cvs-commit
mailing list