From 3fdb2d79c647bde2d5fecc70e45d08ac2ee2d425 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Nov 2025 14:59:26 +0100 Subject: [PATCH] Normalize feature flag handling in build.func Updated feature flag normalization to support both yes/no and 0/1 formats for ENABLE_NESTING, ENABLE_KEYCTL, and ENABLE_MKNOD. ENABLE_FUSE remains as yes/no for backward compatibility. --- misc/build.func | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index 7300ab2c6..928d16238 100644 --- a/misc/build.func +++ b/misc/build.func @@ -542,18 +542,19 @@ base_settings() { PROTECT_CT=${var_protection:-"${1:-no}"} CT_TIMEZONE=${var_timezone:-""} - # Normalize numeric feature flags (keep ENABLE_FUSE as yes/no for compatibility) + # Normalize numeric feature flags (handle both yes/no and 0/1 formats) + # Keep ENABLE_FUSE as yes/no for backward compatibility case "${ENABLE_NESTING,,}" in - yes | true) ENABLE_NESTING="1" ;; - no | false) ENABLE_NESTING="0" ;; + yes | true | 1) ENABLE_NESTING="1" ;; + no | false | 0) ENABLE_NESTING="0" ;; esac case "${ENABLE_KEYCTL,,}" in - yes | true) ENABLE_KEYCTL="1" ;; - no | false) ENABLE_KEYCTL="0" ;; + yes | true | 1) ENABLE_KEYCTL="1" ;; + no | false | 0) ENABLE_KEYCTL="0" ;; esac case "${ENABLE_MKNOD,,}" in - yes | true) ENABLE_MKNOD="1" ;; - no | false) ENABLE_MKNOD="0" ;; + yes | true | 1) ENABLE_MKNOD="1" ;; + no | false | 0) ENABLE_MKNOD="0" ;; esac # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts