From e934a18fa5f9e26ed8687026bdbb8eb250cf9db8 Mon Sep 17 00:00:00 2001 From: Roshan-R Date: Tue, 10 Jun 2025 14:04:48 +0530 Subject: [PATCH] fix: allow script to run when SELinux is disabled The script previously ran only with SELinux in permissive mode. This update enables it to run when SELinux is disabled, supporting environments like containers. --- custom-coreos-disk-images.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom-coreos-disk-images.sh b/custom-coreos-disk-images.sh index ebf1daf..91eb8f9 100755 --- a/custom-coreos-disk-images.sh +++ b/custom-coreos-disk-images.sh @@ -139,9 +139,9 @@ main() { # Make sure RPMs are installed check_rpms - # Make sure SELinux is permissive - if [ "$(getenforce)" != "Permissive" ]; then - echo "SELinux needs to be set to permissive mode" + # Make sure SELinux is not enforcing + if [ "$(getenforce)" == "Enforcing" ]; then + echo "SELinux needs to be set to either permissive or disabled" exit 1 fi # Make sure we are effectively `root`