diff --git a/rpld.spec b/rpld.spec index f34c291..c0f3d4c 100644 --- a/rpld.spec +++ b/rpld.spec @@ -16,7 +16,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: byacc flex %if 0%{?fedora} >= 15 BuildRequires: systemd-units -Requires(post): systemd-units +Requires(post): systemd-units systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units %else @@ -37,7 +37,7 @@ Summary: SysV init script for %{name}. %description sysvinit SysV init script for %{name}. -%triggerpostun -n rpld-sysvinit -- packagename < 1.8-0.12.beta1 +%triggerpostun -n rpld-sysvinit -- %{rpld} < 1.8-0.12.beta1 /sbin/chkconfig --add httpd >/dev/null 2>&1 || : %post @@ -60,6 +60,12 @@ if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall /bin/systemctl try-restart rpld.service >/dev/null 2>&1 || : fi + +%triggerun -- rpld < 1.8-0.12.beta1 +/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&1 ||: +/sbin/chkconfig --del %{name} >/dev/null 2>&1 || : +/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : + %else %post /sbin/chkconfig --add %{name}