mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-22 10:22:18 +00:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user