Use macros and don't call systemctl directly
- Resolves: rhbz#850328 - Introduce new systemd-rpm macros in sssd spec file
This commit is contained in:
parent
9f85549912
commit
94f4c4dd6d
17
sssd.spec
17
sssd.spec
@ -948,24 +948,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/pkgconfig/wbclient_sssd.pc
|
%{_libdir}/pkgconfig/wbclient_sssd.pc
|
||||||
|
|
||||||
%post common
|
%post common
|
||||||
if [ $1 -ge 1 ] ; then
|
%systemd_post sssd.service
|
||||||
# Initial installation
|
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun common
|
%preun common
|
||||||
if [ $1 -eq 0 ] ; then
|
%systemd_preun sssd.service
|
||||||
# Package removal, not upgrade
|
|
||||||
/bin/systemctl --no-reload disable sssd.service > /dev/null 2>&1 || :
|
|
||||||
/bin/systemctl stop sssd.service > /dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun common
|
%postun common
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
%systemd_postun_with_restart sssd.service
|
||||||
if [ $1 -ge 1 ] ; then
|
|
||||||
# Package upgrade, not uninstall
|
|
||||||
/bin/systemctl try-restart sssd.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%if (0%{?with_cifs_utils_plugin} == 1)
|
%if (0%{?with_cifs_utils_plugin} == 1)
|
||||||
%post client
|
%post client
|
||||||
|
Loading…
Reference in New Issue
Block a user