Use "new" systemd macros for service handling. (Thanks vpavlin!)

Resolves: #850399
This commit is contained in:
Robbie Harwood 2016-01-20 22:10:57 +00:00
parent 21a49ad7c7
commit ce63dad07e

View File

@ -13,7 +13,7 @@
Summary: The Kerberos network authentication system Summary: The Kerberos network authentication system
Name: krb5 Name: krb5
Version: 1.14 Version: 1.14
Release: 14%{?dist} Release: 15%{?dist}
# - Maybe we should explode from the now-available-to-everybody tarball instead? # - Maybe we should explode from the now-available-to-everybody tarball instead?
# http://web.mit.edu/kerberos/dist/krb5/1.13/krb5-1.13.2-signed.tar # http://web.mit.edu/kerberos/dist/krb5/1.13/krb5-1.13.2-signed.tar
# - The sources below are stored in a lookaside cache. Upload with # - The sources below are stored in a lookaside cache. Upload with
@ -562,30 +562,15 @@ fi
%post server %post server
# Remove the init script for older servers. # Remove the init script for older servers.
[ -x /etc/rc.d/init.d/krb5server ] && /sbin/chkconfig --del krb5server [ -x /etc/rc.d/init.d/krb5server ] && /sbin/chkconfig --del krb5server
if (( $1 == 1 )) ; then %systemd_post krb5kdc.service kadmin.service kprop.service
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
exit 0 exit 0
%preun server %preun server
if (( "$1" == 0 )) ; then %systemd_preun krb5kdc.service kadmin.service kprop.service
/bin/systemctl --no-reload disable krb5kdc.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload disable kadmin.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload disable kprop.service > /dev/null 2>&1 || :
/bin/systemctl stop krb5kdc.service > /dev/null 2>&1 || :
/bin/systemctl stop kadmin.service > /dev/null 2>&1 || :
/bin/systemctl stop kprop.service > /dev/null 2>&1 || :
fi
exit 0 exit 0
%postun server %postun server
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart krb5kdc.service kadmin.service kprop.service
if (( $1 >= 1 )) ; then
/bin/systemctl try-restart krb5kdc.service >/dev/null 2>&1 || :
/bin/systemctl try-restart kadmin.service >/dev/null 2>&1 || :
/bin/systemctl try-restart kprop.service >/dev/null 2>&1 || :
fi
exit 0 exit 0
%triggerun server -- krb5-server < 1.6.3-100 %triggerun server -- krb5-server < 1.6.3-100
@ -781,6 +766,10 @@ exit 0
%changelog %changelog
* Wed Jan 20 2016 Robbie Harwood <rharwood@redhat.com> - 1.14-15
- Use "new" systemd macros for service handling. (Thanks vpavlin!)
- Resolves: #850399
* Wed Jan 20 2016 Robbie Harwood <rharwood@redhat.com> - 1.14-14 * Wed Jan 20 2016 Robbie Harwood <rharwood@redhat.com> - 1.14-14
- Remove WITH_NSS macro (always false) - Remove WITH_NSS macro (always false)
- Remove WITH_SYSTEMD macro (always true) - Remove WITH_SYSTEMD macro (always true)