From 5763aa2ceefe0f4531201e12a26185d433a65cf8 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sat, 26 Aug 2023 23:12:22 +0800 Subject: [PATCH] Update install_pve.sh --- scripts/install_pve.sh | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/scripts/install_pve.sh b/scripts/install_pve.sh index 9e25daf..d8c85ca 100644 --- a/scripts/install_pve.sh +++ b/scripts/install_pve.sh @@ -807,20 +807,19 @@ fi ipv6_address=$(cat /usr/local/bin/pve_check_ipv6) ipv6_prefixlen=$(cat /usr/local/bin/pve_ipv6_prefixlen) ipv6_gateway=$(cat /usr/local/bin/pve_ipv6_gateway) -while true; do - if ping -c 1 -6 -W 3 $ipv6_address >/dev/null 2>&1; then - echo "IPv6 address is reachable." - else - echo "IPv6 address is not reachable. Setting to empty." - echo "" > /usr/local/bin/pve_check_ipv6 - fi - if ping -c 1 -6 -W 3 $ipv6_gateway >/dev/null 2>&1; then - echo "IPv6 gateway is reachable." - else - echo "IPv6 gateway is not reachable. Setting to empty." - echo "" > /usr/local/bin/pve_ipv6_gateway - fi -done +if ping -c 1 -6 -W 3 $ipv6_address >/dev/null 2>&1; then + echo "IPv6 address is reachable." +else + echo "IPv6 address is not reachable. Setting to empty." + echo "" > /usr/local/bin/pve_check_ipv6 +fi +if ping -c 1 -6 -W 3 $ipv6_gateway >/dev/null 2>&1; then + echo "IPv6 gateway is reachable." + +else + echo "IPv6 gateway is not reachable. Setting to empty." + echo "" > /usr/local/bin/pve_ipv6_gateway +fi ipv6_address=$(cat /usr/local/bin/pve_check_ipv6) ipv6_gateway=$(cat /usr/local/bin/pve_ipv6_gateway)