From 414b36410d55ba00b86ada964fdbbb22a32620ce Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 17 Nov 2025 14:35:59 +0100 Subject: [PATCH] Normalize feature flags to numeric values in build.func Updated ENABLE_NESTING, ENABLE_KEYCTL, and ENABLE_MKNOD normalization to ensure they are set to 0 or 1, as required by pct. This improves compatibility and prevents issues with non-numeric values. --- misc/build.func | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 37daf33df..0ff92d2e0 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2267,7 +2267,28 @@ build_container() { esac # Build FEATURES string with advanced settings - # Start with nesting (almost always enabled for Proxmox CTs) + # Normalize ENABLE_NESTING to 0 or 1 (pct requires numeric values, not yes/no) + case "$ENABLE_NESTING" in + yes | 1 | true) ENABLE_NESTING="1" ;; + no | 0 | false) ENABLE_NESTING="0" ;; + *) ENABLE_NESTING="1" ;; # Default to enabled + esac + + # Normalize ENABLE_KEYCTL to 0 or 1 + case "$ENABLE_KEYCTL" in + yes | 1 | true) ENABLE_KEYCTL="1" ;; + no | 0 | false) ENABLE_KEYCTL="0" ;; + *) ENABLE_KEYCTL="0" ;; # Default to disabled + esac + + # Normalize ENABLE_MKNOD to 0 or 1 + case "$ENABLE_MKNOD" in + yes | 1 | true) ENABLE_MKNOD="1" ;; + no | 0 | false) ENABLE_MKNOD="0" ;; + *) ENABLE_MKNOD="0" ;; # Default to disabled + esac + + # Build FEATURES string FEATURES="nesting=${ENABLE_NESTING}" # keyctl: needed for Docker inside containers (systemd-networkd workaround)