mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-01-31 01:58:53 +08:00
Update check_kernal.sh
This commit is contained in:
parent
5763aa2cee
commit
68928147e8
1 changed files with 12 additions and 14 deletions
|
@ -157,20 +157,18 @@ if command -v lshw >/dev/null 2>&1; then
|
|||
if [ -z "$ipv6_address" ] || [ -z "$ipv6_prefixlen" ] || [ -z "$ipv6_gateway" ]; then
|
||||
:
|
||||
else
|
||||
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)
|
||||
_green "The following IPV6 information is detected for this machine:"
|
||||
|
|
Loading…
Reference in a new issue