fix upgrade problem that sysstat.service changes from disable to enable

(cherry picked from commit 6a71a475977c47c1df298574bcfcc8233fdf5e21)
This commit is contained in:
zhouwenpei 2024-01-10 01:33:17 +00:00 committed by openeuler-sync-bot
parent 93cb4317f3
commit 4d9c4b1d0d

View File

@ -1,6 +1,6 @@
Name: sysstat
Version: 12.2.1
Release: 7
Release: 8
Summary: System performance tools for the Linux operating system
License: GPLv2+
URL: http://sebastien.godard.pagesperso-orange.fr/
@ -80,7 +80,9 @@ export compressafter="31"
%systemd_postun sysstat.service sysstat-collect.timer sysstat-summary.timer
%posttrans
/usr/bin/systemctl enable sysstat.service >/dev/null 2>&1
if [ "$(systemctl is-enable sysstat.service)" == "enabled" ] ; then
/usr/bin/systemctl enable sysstat.service >/dev/null 2>&1
fi
%files -f %{name}.lang
%doc CHANGES COPYING CREDITS FAQ.md README.md %{name}-%{version}.lsm
@ -93,6 +95,9 @@ export compressafter="31"
%{_mandir}/man*/*
%changelog
* Wed Jan 10 2024 zhouwenpei <zhouwenpei1@h-partners.com> - 12.2.1-8
- fix upgrade problem that sysstat.service changes from disable to enable
* Tue Jun 20 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 12.2.1-7
- Try to avoid negative values