Description of problem:
When installing nagios-selinux the nagios_epel module is not loaded.
Version-Release number of selected component (if applicable):
nagios-selinux-4.3.2-8.el7.x86_64.rpm
Steps to Reproduce:
1. rpm -ivh nagios-selinux-4.3.2-8.el7.x86_64.rpm
2.
3.
Actual results:
nagios_epel module is not loaded.
[root@konan:production: ~]# semodule -l | grep nagios_epel
[root@konan:production: ~]#
Expected results:
nagios_epel module is loaded. Or at least there's a message displayed indicating that it failed to load.
Additional info:
Path used to load the module in the postinstall-scriptlet is different to where the module is installed.
if [ "$1" -le "1" ]; then # Fist install
semodule -i /usr/share/selinux/packages/nagios_epel.pp 2>/dev/null || :
fixfiles -R nagios restore || :
systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
systemctl try-restart nagios.service >/dev/null 2>&1 || :
fi
fi
[root@konan:production: ~]# rpm -ql nagios-selinux | grep nagios_epel
/usr/share/selinux/packages/nagios/nagios_epel.pp
[root@konan:production: ~]#
It is not evident that the postinstall-script fails to load the module because errors are sent to /dev/null, which is unhelpful.
Also the postinstall scriptlet seems to have a logic flaw. How will "systemctl try-restart nagios.service" ever get called? The check for $1 being greater than 1 is inside the check for $1 being less than 1.
Comment 1Fedora Update System
2017-11-20 23:49:15 UTC