Adjust vpp-selinux-policy postinstall

Only run semodule command on hosts where selinux
is enabled.

Change-Id: I7bcfc758e44bb0f41ec657ad395352ddb92766eb
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
This commit is contained in:
Matthew Smith
2018-02-22 21:12:11 -06:00
committed by Damjan Marion
parent 0b8567331c
commit 7c172cb245

View File

@ -325,8 +325,8 @@ fi
%post selinux-policy
%_format MODULES %{_datadir}/selinux/packages/$x.pp
%{_sbindir}/semodule -n -X 400 -s %{selinuxtype} -i $MODULES
if %{_sbindir}/selinuxenabled ; then
%{_sbindir}/semodule -n -X 400 -s %{selinuxtype} -i $MODULES
%{_sbindir}/load_policy
%relabel_files
fi