Use systemd scriptlets for Fedora 18+ (RHBZ#850184)

This commit is contained in:
Richard W.M. Jones 2012-08-21 14:53:16 +01:00
parent 64e824caeb
commit b6d75ce668

View File

@ -492,24 +492,13 @@ safely edit files in running guests.
This daemon is *not* required by %{name}.
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
%post live-service
if [ $1 -eq 1 ] ; then
# Initial installation.
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%systemd_post guestfsd.service
%preun live-service
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade.
/bin/systemctl stop guestfsd.service > /dev/null 2>&1 || :
fi
%systemd_preun guestfsd.service
%postun live-service
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall.
/bin/systemctl try-restart guestfsd.service >/dev/null 2>&1 || :
fi
%systemd_postun_with_restart guestfsd.service
%package -n ocaml-%{name}