!73 [sync] PR-70: fix upgrade problem that sysstat.service changes from disable to enable

From: @openeuler-sync-bot 
Reviewed-by: @overweight 
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2024-01-10 08:04:42 +00:00 committed by Gitee
commit 5e3813c8f2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: sysstat
Version: 12.5.4
Release: 9
Release: 10
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.5.4-10
- fix upgrade problem that sysstat.service changes from disable to enable
* Wed Jun 14 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 12.5.4-9
- Try to avoid negative values