From eef553f3bef1ce85120b7cb4df0e849302e45424 Mon Sep 17 00:00:00 2001 From: Alessandro Pirastru Date: Sat, 26 Apr 2025 16:21:52 +0200 Subject: [PATCH] fix: Correct SELinux boolean parsing and add loop break - Fixed incorrect parsing of `container_use_devices` boolean by changing the awk field from `$2` to `$3` to retrieve the correct value. - Added a `break` statement after enabling the SELinux boolean to prevent unnecessary loop iterations after user prompt. Signed-off-by: Alessandro Pirastru --- docs/static/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/static/install.sh b/docs/static/install.sh index 2e874c53..cfcc5fee 100755 --- a/docs/static/install.sh +++ b/docs/static/install.sh @@ -317,7 +317,7 @@ enable_selinux_container_booleans() { if [ "$SELINUX_MODE" == "Enforcing" ]; then # Check the status of container_use_devices - CONTAINER_USE_DEVICES=$(getsebool container_use_devices | awk '{print $2}') + CONTAINER_USE_DEVICES=$(getsebool container_use_devices | awk '{print $3}') if [ "$CONTAINER_USE_DEVICES" == "off" ]; then @@ -339,6 +339,8 @@ enable_selinux_container_booleans() { if [ "$Answer" = "yes" ]; then warn "Enabling \"container_use_devices\" persistently..." $SUDO setsebool -P container_use_devices 1 + + break elif [ "$Answer" = "exit" ]; then aborted else