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