[Bug 244894] Review Request: yum-cron - get yum updates via a cron job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: Review Request: yum-cron - get yum updates via a cron job


https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=244894





------- Additional Comments From ahabig@xxxxxxx  2007-06-28 16:49 EST -------
Updated in response to the problems with upgrading from the old yum-cron-0.1-1:

Spec URL: http://neutrino.d.umn.edu/~habig/yum-cron.spec
SRPM URL: http://neutrino.d.umn.edu/~habig/yum-cron-0.2-4.src.rpm

In the %post scriptlet, I now check for the existence of the oldly-named
/etc/init.d/yum script.  If it's there, I assume we're upgrading from the old
version.  If the old service was active, the new yum-cron is also started.  If
it was inactive, the new script defaults to installed but off.  In either case,
the oldly named yum service is removed from chkconfig control.

Tested on machines running 0.1-1 in various states, and in fresh installs.

The new %post scriptlet:

%post
# Make sure chkconfig knows about the service
/sbin/chkconfig --add yum-cron
# if an upgrade:
if [ "$1" -ge "1" ]; then
# if there's a /etc/rc.d/init.d/yum file left, assume that there was an
# older instance of yum-cron which used this naming convention.  Clean
# it up, do a conditional restart
 if [ -f /etc/init.d/yum ]; then
# was it on?
  /sbin/chkconfig yum
  RETVAL=$?
  if [ $RETVAL = 0 ]; then
# if it was, stop it, then turn on new yum-cron
   /sbin/service yum stop >> /dev/null
   /sbin/service yum-cron start >> /dev/null
   /sbin/chkconfig yum-cron on
  fi
# remove it from the service list
  /sbin/chkconfig --del yum
 fi
fi
exit 0


-- 
Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

_______________________________________________
Fedora-package-review mailing list
Fedora-package-review@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-package-review

[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]