[PATCH 3/3] Package yum-cron-hourly.{service,sysvinit}
Zdenek Pavlas
zpavlas at redhat.com
Wed Jan 15 09:34:08 UTC 2014
I'd prefer yum-cron-hourly to be off by default. Added -hourly
only to %preun cron, %postun cron. Should we support sysv, too?
This probably needs some discussion..
---
yum-cron/Makefile | 2 ++
yum.spec | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/yum-cron/Makefile b/yum-cron/Makefile
index cd3ff5f..650e239 100644
--- a/yum-cron/Makefile
+++ b/yum-cron/Makefile
@@ -8,9 +8,11 @@ install: install-$(INIT)
install-systemd: install-common
install -D -m 644 yum-cron.service $(DESTDIR)/$(UNITDIR)/yum-cron.service
+ install -D -m 644 yum-cron-hourly.service $(DESTDIR)/$(UNITDIR)/yum-cron-hourly.service
install-sysv: install-common
install -D -m 755 yum-cron.sysvinit $(DESTDIR)/etc/rc.d/init.d/yum-cron
+ install -D -m 755 yum-cron-hourly.sysvinit $(DESTDIR)/etc/rc.d/init.d/yum-cron-hourly
install-common:
mkdir -p $(DESTDIR)/etc/cron.hourly
diff --git a/yum.spec b/yum.spec
index a3e9bcf..fe9ddb5 100644
--- a/yum.spec
+++ b/yum.spec
@@ -321,6 +321,7 @@ exit 0
%preun cron
%if %{yum_cron_systemd}
%systemd_preun yum-cron.service
+%systemd_preun yum-cron-hourly.service
%else
# SYSV init preun cron
# if this will be a complete removeal of yum-cron rather than an upgrade,
@@ -335,6 +336,7 @@ exit 0
%postun cron
%if %{yum_cron_systemd}
%systemd_postun_with_restart yum-cron.service
+%systemd_postun_with_restart yum-cron-hourly.service
%else
# SYSV init postun cron
@@ -409,8 +411,9 @@ exit 0
%config(noreplace) %{_sysconfdir}/yum/yum-cron-hourly.conf
%if %{yum_cron_systemd}
%{_unitdir}/yum-cron.service
+%{_unitdir}/yum-cron-hourly.service
%else
-%{_sysconfdir}/rc.d/init.d/yum-cron
+%{_sysconfdir}/rc.d/init.d/yum-cron-hourly
%endif
%{_sbindir}/yum-cron
%{_mandir}/man*/yum-cron.*
--
1.7.11.7
More information about the Yum-devel
mailing list