aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/install-redhat.sh8
-rwxr-xr-xscripts/tar-to-image.sh1
2 files changed, 8 insertions, 1 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
diff --git a/scripts/tar-to-image.sh b/scripts/tar-to-image.sh
index 0d3bdaa..264cde4 100755
--- a/scripts/tar-to-image.sh
+++ b/scripts/tar-to-image.sh
@@ -178,7 +178,6 @@ function fish_copy_tar() {
msg "copying tarball to image"
fish tar-in $tarb / compress:gzip
fish copy-in $fstab /etc
- fish write /.autorelabel ""
}
function fish_part_efi_grub2() {