From d99c2953a6748781dd620fd068235ebc9a82cced Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Tue, 27 Oct 2026 09:24:03 +0100 Subject: [PATCH] Skip the IPv6 sysctl when the host kernel has no IPv6 --- lxc/install.func | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxc/install.func b/lxc/install.func index 7eb9647..35f1d43 100644 --- a/lxc/install.func +++ b/lxc/install.func @@ -1114,6 +1114,10 @@ verb_ip6() { set_std_mode # Set STD mode based on VERBOSE if [[ "${IPV6_METHOD:-}" == "disable" ]]; then + if [[ ! -d /proc/sys/net/ipv6 ]]; then + msg_ok "IPv6 is already disabled by the host kernel" + return 0 + fi msg_info "Disabling IPv6 (this may affect some services)" mkdir -p /etc/sysctl.d cat >/etc/sysctl.d/99-disable-ipv6.conf <