From 008f6af0bd1c5a7446df210e71989efec7326908 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:40:25 +0100 Subject: [PATCH] Call get_lxc_ip explicitly after network is up Moved the get_lxc_ip call from automatic execution in load_functions to explicit calls in alpine-install.func and install.func, ensuring the LXC IP is retrieved only after the network is up inside the container. Updated comments to clarify usage. --- misc/alpine-install.func | 3 +++ misc/core.func | 3 ++- misc/install.func | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 892d84ee6..3e23ba540 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -11,6 +11,9 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV load_functions catch_errors +# Get LXC IP address (must be called INSIDE container, after network is up) +get_lxc_ip + # This function enables IPv6 if it's not disabled and sets verbose mode verb_ip6() { set_std_mode # Set STD mode based on VERBOSE diff --git a/misc/core.func b/misc/core.func index 5b4351743..ff20efb9b 100644 --- a/misc/core.func +++ b/misc/core.func @@ -38,7 +38,8 @@ load_functions() { icons default_vars set_std_mode - get_lxc_ip + # Note: get_lxc_ip() is NOT called here automatically + # Call it explicitly when you need LOCAL_IP variable } # ------------------------------------------------------------------------------ diff --git a/misc/install.func b/misc/install.func index 0e258adb0..f757e78d1 100644 --- a/misc/install.func +++ b/misc/install.func @@ -37,6 +37,9 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV load_functions catch_errors +# Get LXC IP address (must be called INSIDE container, after network is up) +get_lxc_ip + # ============================================================================== # SECTION 2: NETWORK & CONNECTIVITY # ==============================================================================