Run %triggerun regardless of systemd_post variable definition

This commit is contained in:
Honza Horák 2012-10-04 12:48:42 +02:00
parent 265a5ef009
commit cb4c6da011
1 changed files with 15 additions and 12 deletions

View File

@ -4,7 +4,7 @@ Summary: The NIS (Network Information Service) server
Url: http://www.linux-nis.org/nis/ypserv/index.html
Name: ypserv
Version: 2.29
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: http://www.linux-nis.org/download/ypserv/ypserv-%{version}.tar.bz2
@ -139,19 +139,19 @@ install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/rpc.yppasswdd.env
# Package install, not upgrade
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%triggerun -- ypserv < 2.25-2
if /sbin/chkconfig --level 3 ypserv ; then
/bin/systemctl --no-reload enable ypserv.service >/dev/null 2>&1 || :
fi
if /sbin/chkconfig --level 3 ypxfrd ; then
/bin/systemctl --no-reload enable ypxfrd.service >/dev/null 2>&1 || :
fi
if /sbin/chkconfig --level 3 yppasswdd ; then
/bin/systemctl --no-reload enable yppasswdd.service >/dev/null 2>&1 || :
fi
%endif
%triggerun -- ypserv < 2.25-2
if /sbin/chkconfig --level 3 ypserv ; then
/bin/systemctl --no-reload enable ypserv.service >/dev/null 2>&1 || :
fi
if /sbin/chkconfig --level 3 ypxfrd ; then
/bin/systemctl --no-reload enable ypxfrd.service >/dev/null 2>&1 || :
fi
if /sbin/chkconfig --level 3 yppasswdd ; then
/bin/systemctl --no-reload enable yppasswdd.service >/dev/null 2>&1 || :
fi
%preun
%if 0%{?systemd_preun:1}
%systemd_preun ypserv.service
@ -208,6 +208,9 @@ NOPUSH=true make -eC /var/yp >&2 || :
%{_includedir}/*/*
%changelog
* Thu Oct 04 2012 Honza Horak <hhorak@redhat.com> - 2.29-3
- Run %%triggerun regardless of systemd_post variable definition
* Mon Sep 24 2012 Honza Horak <hhorak@redhat.com> - 2.29-2
- Use new systemd macros
Resolves: #850376