Switch to new systemd macros for F18+

Resolves bz850202

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
Jes Sorensen 2012-09-10 10:05:43 +02:00
parent ddb12f7a60
commit 6e6b5143a1

View File

@ -1,7 +1,7 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm
Version: 3.2.5
Release: 7%{?dist}
Release: 8%{?dist}
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
Source1: mdmonitor.init
Source2: raid-check
@ -87,21 +87,13 @@ install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}/
rm -rf %{buildroot}
%post
if [ $1 -eq 1 ] ; then
/bin/systemctl enable mdmonitor.service mdmonitor-takeover.service >/dev/null 2>&1 || :
fi
%systemd_post mdmonitor.service mdmonitor-takeover.service
%preun
if [ $1 = 0 ]; then
/bin/systemctl --no-reload disable mdmonitor.service mdmonitor-takeover.service > /dev/null 2>&1 || :
/bin/systemctl stop mdmonitor.service mdmonitor-takeover.service > /dev/null 2>&1 || :
fi
%systemd_preun mdmonitor.service mdmonitor-takeover.service
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart mdmonitor.service >/dev/null 2>&1 || :
fi
%systemd_postun_with_restart mdmonitor.service
%triggerun -- %{name} < 3.2.2-3
%{_bindir}/systemd-sysv-convert --save mdmonitor >/dev/null 2>&1 || :
@ -130,6 +122,10 @@ fi
%{_initrddir}/*
%changelog
* Mon Sep 10 2012 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.5-8
- Switch to using new systemd macros for F18+
- Resolves bz850202
* Thu Aug 2 2012 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.5-7
- Remove bogus rogue patch applied in 3.2.5-5 with justification and
without following the structure of the mdadm package.