Scriptlets replaced with new systemd macros

This commit is contained in:
David Teigland 2012-09-05 08:54:12 -05:00
parent d2bcec649b
commit 5b976e5f84

View File

@ -1,6 +1,6 @@
Name: dlm
Version: 3.99.5
Release: 6%{?dist}
Release: 7%{?dist}
License: GPLv2 and GPLv2+ and LGPLv2+
# For a breakdown of the licensing, see README.license
Group: System Environment/Kernel
@ -53,21 +53,13 @@ install -Dm 0644 init/dlm.service %{buildroot}%{_unitdir}/dlm.service
install -Dm 0644 init/dlm.sysconfig %{buildroot}/etc/sysconfig/dlm
%post
if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%systemd_post dlm.service
%preun
if [ $1 -eq 0 ] ; then
/bin/systemctl --no-reload disable dlm.service > /dev/null 2>&1 || :
/bin/systemctl stop dlm.service > /dev/null 2>&1 || :
fi
%systemd_preun dlm.service
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart dlm.service >/dev/null 2>&1 || :
fi
%systemd_postun_with_restart dlm.service
%files
%defattr(-,root,root,-)
@ -116,6 +108,9 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/*.pc
%changelog
* Wed Sep 05 2012 Václav Pavlín <vpavlin@redhat.com> - 3.99.5-7
- Scriptlets replaced with new systemd macros (#850093)
* Tue Aug 28 2012 David Teigland <teigland@redhat.com> - 3.99.5-6
- only fedora requires kernel-modules-extra