Fix failure of stopping auditd before uninstalling

This commit is contained in:
yixiangzhike 2022-01-26 09:21:37 +08:00
parent caec238c79
commit 6490fe287d

View File

@ -2,7 +2,7 @@ Summary: User space tools for kernel auditing
Name: audit Name: audit
Epoch: 1 Epoch: 1
Version: 3.0.1 Version: 3.0.1
Release: 1 Release: 2
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
URL: https://people.redhat.com/sgrubb/audit/ URL: https://people.redhat.com/sgrubb/audit/
Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
@ -269,7 +269,14 @@ if [ -d "/etc/audisp/" ];then
fi fi
%preun %preun
%systemd_preun auditd.service if [ $1 -eq 0 ] && [ -x /usr/bin/systemctl ]; then
# Package removal, not upgrade
/usr/bin/systemctl --no-reload disable auditd.service || :
fi
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
/sbin/service auditd stop > /dev/null 2>&1
fi
%postun %postun
/sbin/ldconfig /sbin/ldconfig
@ -362,6 +369,9 @@ fi
%attr(644,root,root) %{_mandir}/man8/*.8.gz %attr(644,root,root) %{_mandir}/man8/*.8.gz
%changelog %changelog
* Sat Feb 12 2022 yixiangzhike <yixiangzhike007@163.com> - 3.0.1-2
- Fix failure of stopping auditd before uninstalling
* Fri Dec 31 2021 yixiangzhike <yixiangzhike007@163.com> - 3.0.1-1 * Fri Dec 31 2021 yixiangzhike <yixiangzhike007@163.com> - 3.0.1-1
- update to 3.0.1 - update to 3.0.1