修复post中/etc/pam.d/crond sed关键字错误问题

Signed-off-by: leeffo <liweiganga@uniontech.com>
This commit is contained in:
leeffo 2022-08-29 05:20:39 +00:00 committed by Gitee
parent 2226f69e2f
commit eabfe57871
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
Summary: openEuler Security Tool
Name : security-tool
Version: 2.0
Release: 1.75
Release: 1.76
Source0: https://gitee.com/openeuler/security-tool/repository/archive/v2.0.tar.gz
License: Mulan PSL v2
URL: https://gitee.com/openeuler/security-tool
@ -50,7 +50,7 @@ rm -rf $RPM_BUILD_ROOT
%pre
%post
sed -i 's/password-auth$/password-auth-crond/g' /etc/pam.d/crond
sed -i 's/system-auth$/password-auth-crond/g' /etc/pam.d/crond
if [ $1 -ge 2 ]
then
@ -73,7 +73,7 @@ systemctl enable openEuler-security.service
%systemd_preun openEuler-security.service
if [ $1 -eq 0 ]
then
sed -i 's/password-auth-crond$/password-auth/g' /etc/pam.d/crond
sed -i 's/password-auth-crond$/system-auth/g' /etc/pam.d/crond
fi
%postun
@ -119,6 +119,9 @@ fi
%attr(0500,root,root) %{_sbindir}/security-tool.sh
%changelog
* Mon Aug 29 2022 liweiganga <liweiganga@uniontech.com> - 2.0-1.76
- fix sed keyword error in /etc/pam.d/crond
* Tue Jun 29 2021 gaoyusong <gaoyusong1@huawei.com> - 2.0-1.75
- rebuild package version