Author: glen Date: Wed Nov 18 12:19:38 2009 GMT Module: packages Tag: HEAD ---- Log message: - cosmetics
---- Files affected: packages/yum: yum-updatesd.init (1.5 -> 1.6) ---- Diffs: ================================================================ Index: packages/yum/yum-updatesd.init diff -u packages/yum/yum-updatesd.init:1.5 packages/yum/yum-updatesd.init:1.6 --- packages/yum/yum-updatesd.init:1.5 Mon Dec 17 18:17:06 2007 +++ packages/yum/yum-updatesd.init Wed Nov 18 13:19:33 2009 @@ -2,54 +2,70 @@ # # yum This shell script enables the yum-updates daemon # -# Author: Jeremy Katz <[email protected]> -# # chkconfig: 345 97 03 # # description: This is a daemon which periodically checks for updates \ # and can send notifications via mail, dbus or syslog. +# # processname: yum-updatesd # config: /etc/yum/yum-updatesd.conf # pidfile: /var/run/yum-updatesd.pid # +# $Id$ # source function library . /etc/rc.d/init.d/functions +# Get network config +. /etc/sysconfig/network + # Get service config - may override defaults [ -f /etc/sysconfig/yum-updatesd ] && . /etc/sysconfig/yum-updatesd +# Check that networking is up. +if is_yes "${NETWORKING}"; then + if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then + msg_network_down "Yum Updatesd" + exit 1 + fi +else + exit 0 +fi + start() { # Check if the service is already running? - if [ ! -f /var/lock/subsys/yum-updatesd ]; then - msg_starting yum-updatesd - daemon /usr/sbin/yum-updatesd - RETVAL=$? - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/yum-updatesd - else - msg_already_running yum-updatesd + if [ -f /var/lock/subsys/yum-updatesd ]; then + msg_already_running "Yum Updatesd" + return fi + + msg_starting "Yum Updatesd" + daemon /usr/sbin/yum-updatesd + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/yum-updatesd } stop() { - if [ -f /var/lock/subsys/yum-updatesd ]; then - # Stop daemons. - msg_stopping yum-updatesd - killproc yum-updatesd - rm -f /var/lock/subsys/yum-updatesd - else - msg_not_running yum-updatesd + if [ ! -f /var/lock/subsys/yum-updatesd ]; then + msg_not_running "Yum Updatesd" + return fi + + # Stop daemons. + msg_stopping "Yum Updatesd" + killproc yum-updatesd + rm -f /var/lock/subsys/yum-updatesd } condrestart() { if [ -f /var/lock/subsys/yum-updatesd ]; then - stop - start - else - msg_not_running yum-updatesd + msg_not_running "Yum Updatesd" RETVAL=$1 + return fi + + stop + start } RETVAL=0 ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/yum/yum-updatesd.init?r1=1.5&r2=1.6&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
