mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-09-09 16:04:20 +08:00
Update install_pve.sh
This commit is contained in:
parent
93cc4bbecc
commit
c821bdd767
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue