mirror of
https://github.com/oneclickvirt/pve.git
synced 2024-09-20 06:55:56 +08:00
2023.11.17
This commit is contained in:
parent
e97c261730
commit
235651e380
|
@ -239,10 +239,8 @@ if command -v lshw >/dev/null 2>&1; then
|
|||
num_lines=$(echo "$output" | wc -l)
|
||||
if [ $num_lines -eq 1 ]; then
|
||||
ipv6_prefixlen="$output"
|
||||
elif [[ "${ipv6_gateway_fe80}" == "N" ]]; then
|
||||
ipv6_prefixlen=$(echo "$output" | head -n 2 | tail -n 1)
|
||||
else
|
||||
ipv6_prefixlen=$(echo "$output" | tail -n 1)
|
||||
ipv6_prefixlen=$(echo "$output" | head -n 2 | tail -n 1)
|
||||
fi
|
||||
if [ -z "$ipv6_prefixlen" ]; then
|
||||
ipv6_prefixlen=$(ifconfig eth0 | grep -oP 'prefixlen \K\d+' | head -n 1)
|
||||
|
|
|
@ -881,10 +881,8 @@ if [ ! -f /usr/local/bin/pve_ipv6_prefixlen ] || [ ! -s /usr/local/bin/pve_ipv6_
|
|||
num_lines=$(echo "$output" | wc -l)
|
||||
if [ $num_lines -eq 1 ]; then
|
||||
ipv6_prefixlen="$output"
|
||||
elif [[ "${ipv6_gateway_fe80}" == "N" ]]; then
|
||||
ipv6_prefixlen=$(echo "$output" | head -n 2 | tail -n 1)
|
||||
else
|
||||
ipv6_prefixlen=$(echo "$output" | tail -n 1)
|
||||
ipv6_prefixlen=$(echo "$output" | head -n 2 | tail -n 1)
|
||||
fi
|
||||
echo "$ipv6_prefixlen" >/usr/local/bin/pve_ipv6_prefixlen
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue