Fixes logrotate and semodule upgrade issue

This commit is contained in:
JumpingYang001 2021-04-01 21:11:20 -07:00 коммит произвёл Jumping Yang[Wicresoft]
Родитель 05401d35c9
Коммит 6a1cdc0434
1 изменённых файлов: 12 добавлений и 7 удалений

Просмотреть файл

@ -55,10 +55,12 @@ if [ -e /usr/sbin/semodule ]; then
fi
%Postuninstall_1500
if [ -e /usr/sbin/semodule ]; then
if [ ! -z "$(/usr/sbin/semodule -l | grep scxagent-logrotate)" ]; then
echo "Removing selinux policy module for scxagent-logrotate ..."
/usr/sbin/semodule -r scxagent-logrotate
if ${{PERFORMING_UPGRADE_NOT}}; then
if [ -e /usr/sbin/semodule ]; then
if [ ! -z "$(/usr/sbin/semodule -l | grep scxagent-logrotate)" ]; then
echo "Removing selinux policy module for scxagent-logrotate ..."
/usr/sbin/semodule -r scxagent-logrotate
fi
fi
fi
@ -147,9 +149,12 @@ fi
fi
#endif
# Clean up logrotate
rm -f /etc/logrotate.d/scxagent
rm -f /etc/cron.d/scxagent
# If we're called for upgrade, don't clean up logrotate
if ${{PERFORMING_UPGRADE_NOT}}; then
# Clean up logrotate
rm -f /etc/logrotate.d/scxagent
rm -f /etc/cron.d/scxagent
fi
%Postuninstall_1100