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