aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/install-redhat.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/install-redhat.sh')
-rwxr-xr-xscripts/install-redhat.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/install-redhat.sh b/scripts/install-redhat.sh
index 227c3b3..a705f7a 100755
--- a/scripts/install-redhat.sh
+++ b/scripts/install-redhat.sh
@@ -188,6 +188,14 @@ if test ! -f ${dest}/etc/sysconfig/kernel; then
echo "DEFAULTKERNEL=kernel-core" >> $WORK/sys-kernel
sudo cp $WORK/sys-kernel ${dest}/etc/sysconfig/kernel
fi
+if test -f ${dest}/etc/selinux/config; then
+ # Ask for relabel.
+ # Put selinux into permissive, relabel might fail otherwise.
+ # After first boot (which relabels) setting enforcing should work.
+ sed -i -e 's/^SELINUX=.*/SELINUX=permissive/' \
+ ${dest}/etc/selinux/config
+ touch "${dest}/.autorelabel"
+fi
sudo rm -rf "${dest}/var/cache/"{dnf,yum}
if test "$tarb" != ""; then