Update check_kernal.sh

This commit is contained in:
spiritlhl 2023-08-27 08:38:07 +08:00 committed by GitHub
parent c821bdd767
commit 0a037f728f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)