migrated to the new systemd-rpm macros
This commit is contained in:
Peter Schiffer 2012-11-13 13:52:19 +01:00
parent 102870ff2e
commit 163f926520

View File

@ -12,10 +12,9 @@ BuildRequires: lm_sensors-devel
BuildRequires: perl %{_includedir}/linux/if.h gettext
BuildRequires: autoconf automake
BuildRequires: systemd-units
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd, systemd-sysv
Requires(preun): systemd
Requires(postun): systemd
%description
This package provides the sar and iostat commands for Linux. Sar and
@ -45,25 +44,17 @@ install -m 0644 sysstat.service %{buildroot}%{_unitdir}/
%find_lang %{name}
%post
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl enable sysstat.service >/dev/null 2>&1 || :
fi
%systemd_post sysstat.service
%preun
%systemd_preun sysstat.service
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable sysstat.service > /dev/null 2>&1 || :
/bin/systemctl stop sysstat.service > /dev/null 2>&1 || :
# Remove sa logs if removing sysstat completely
rm -f %{_localstatedir}/log/sa/*
fi
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart sysstat.service >/dev/null 2>&1 || :
fi
%systemd_postun sysstat.service
%triggerun -- sysstat < 10.0.2-1
# Save the current service runlevel info
@ -93,6 +84,8 @@ fi
* Tue Nov 13 2012 Peter Schiffer <pschiffe@redhat.com> - 10.1.2-1
- resolves: #863791
updated to 10.1.2
- resolves: #850333
migrated to the new systemd-rpm macros
* Wed Aug 01 2012 Peter Schiffer <pschiffe@redhat.com> - 10.1.1-1
- resolves: #844387