From c821bdd7678e9ce71e58f56da789d78c945bc856 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sun, 27 Aug 2023 08:36:52 +0800 Subject: [PATCH] Update install_pve.sh --- scripts/install_pve.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install_pve.sh b/scripts/install_pve.sh index 40a4dfb..a62541b 100644 --- a/scripts/install_pve.sh +++ b/scripts/install_pve.sh @@ -802,6 +802,9 @@ if [ ! -f /usr/local/bin/pve_ipv6_prefixlen ] || [ ! -s /usr/local/bin/pve_ipv6_ fi if [ ! -f /usr/local/bin/pve_ipv6_gateway ] || [ ! -s /usr/local/bin/pve_ipv6_gateway ] || [ "$(sed -e '/^[[:space:]]*$/d' /usr/local/bin/pve_ipv6_gateway)" = "" ]; then ipv6_gateway=$(ip -6 route show | awk '/default via/{print $3}' | head -n1) + if [[ "${ipv6_gateway: -2}" == "::" ]]; then + ipv6_gateway="${ipv6_gateway}0000" + fi echo "$ipv6_gateway" >/usr/local/bin/pve_ipv6_gateway fi ipv6_address=$(cat /usr/local/bin/pve_check_ipv6)