From 0a037f728f48b96d498a53644c238b9c4bbf0020 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sun, 27 Aug 2023 08:38:07 +0800 Subject: [PATCH] Update check_kernal.sh --- scripts/check_kernal.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/check_kernal.sh b/scripts/check_kernal.sh index a8909e8..0dd4ae6 100644 --- a/scripts/check_kernal.sh +++ b/scripts/check_kernal.sh @@ -149,6 +149,9 @@ if command -v lshw >/dev/null 2>&1; then fi if [ ! -f /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)