Author: glen Date: Sun Apr 27 00:59:07 2008 GMT Module: SOURCES Tag: HEAD ---- Log message: - add try-restart
---- Files affected: SOURCES: haldaemon.init (1.10 -> 1.11) ---- Diffs: ================================================================ Index: SOURCES/haldaemon.init diff -u SOURCES/haldaemon.init:1.10 SOURCES/haldaemon.init:1.11 --- SOURCES/haldaemon.init:1.10 Sun Apr 27 02:57:08 2008 +++ SOURCES/haldaemon.init Sun Apr 27 02:59:02 2008 @@ -8,6 +8,7 @@ # about hardware from several sources. \ # See http://www.freedesktop.org/software/hal # +# $Id$ # Source function library @@ -49,6 +50,27 @@ fi } +condrestart() { + if [ -f /var/lock/subsys/haldaemon ]; then + stop + start + else + msg_not_running haldaemon + RETVAL=$1 + fi +} + +reload() { + if [ -f /var/lock/subsys/haldaemon ]; then + msg_reloading haldaemon + killproc hald -HUP + RETVAL=$? + else + msg_not_running haldaemon + RETVAL=7 + fi +} + # See how we were called. case "$1" in start) @@ -61,26 +83,19 @@ stop start ;; + try-restart) + condrestart 0 + ;; reload|force-reload) - if [ -f /var/lock/subsys/haldaemon ]; then - msg_reloading haldaemon - killproc hald -HUP - RETVAL=$? - else - msg_not_running haldaemon - RETVAL=7 - fi + reload ;; status) status hald RETVAL=$? ;; *) - msg_usage "$0 {start|stop|restart|reload|force-reload|status}" + msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}" exit 3 esac exit $RETVAL - -# This must be last line ! -# vi:syntax=sh ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/haldaemon.init?r1=1.10&r2=1.11&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
