From 10c2bd5d9b3509ff18d336bfb7aea4dd1654ca8f Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Wed, 21 Oct 2026 10:44:04 -0300 Subject: [PATCH] fix(xcat-core): the aarch64 postinstall SELinux substitution doubles the key compute.rhels10.aarch64.postinstall arrived after the other netboot postinstall scripts were anchored, and it carries the old pattern: s/SELINUX=enforcing\|permissive/SELINUX=disabled/. The alternation binds to the whole pattern, so the right branch is the bare word permissive. On a permissive image the substitution writes SELINUX=SELINUX=disabled, which no SELinux reads, and it rewrites the comment line that names permissive. On a disabled image it still rewrites that comment. Anchor the pattern to the SELINUX= line, as the other scripts do. postinstall_selinux_config.bats fails three of its six checks against this script before the change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- .../share/xcat/netboot/rh/compute.rhels10.aarch64.postinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels10.aarch64.postinstall b/xCAT-server/share/xcat/netboot/rh/compute.rhels10.aarch64.postinstall index 2ad53bb406..6d62a73c14 100755 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels10.aarch64.postinstall +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels10.aarch64.postinstall @@ -37,7 +37,7 @@ END #-- Need to disable selinux, otherwise, the booting will hang on "Loading selinux policy" if [ -f "$installroot/etc/selinux/config" ] then - sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config + sed -i 's/^SELINUX=.*$/SELINUX=disabled/' $installroot/etc/selinux/config fi #--for redhat 8 and 8.1 #-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys