From ce916fb6ba8ebabf67e19a441029ce4477e2a774 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 19 Nov 2025 16:04:33 +0100 Subject: [PATCH] Enhance IPv6 disabling logic in install script Updated verb_ip6 to check both IPV6_METHOD and DISABLEIPV6 variables. Added disabling for all, default, and loopback interfaces, improved messaging, and redirected sysctl output to /dev/null for cleaner logs. --- misc/install.func | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/misc/install.func b/misc/install.func index 15771cf8e..c424ab043 100644 --- a/misc/install.func +++ b/misc/install.func @@ -15,9 +15,13 @@ load_functions verb_ip6() { set_std_mode # Set STD mode based on VERBOSE - if [ "$DISABLEIPV6" == "yes" ]; then - echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf - $STD sysctl -p + if [ "$IPV6_METHOD" == "none" ] || [ "$DISABLEIPV6" == "yes" ]; then + msg_info "Disabling IPv6" + $STD echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf + $STD echo "net.ipv6.conf.default.disable_ipv6 = 1" >>/etc/sysctl.conf + $STD echo "net.ipv6.conf.lo.disable_ipv6 = 1" >>/etc/sysctl.conf + $STD sysctl -p >/dev/null + msg_ok "Disabled IPv6" fi }