mirror of
https://github.com/oneclickvirt/pve.git
synced 2024-11-10 17:25:50 +08:00
2023.11.27
This commit is contained in:
parent
650592023f
commit
cea94a5c11
4 changed files with 33 additions and 8 deletions
|
@ -1,5 +1,10 @@
|
|||
# 更新日志
|
||||
|
||||
2023.11.26
|
||||
|
||||
- 重新计算IPV6子网的前缀,适配宿主机虽然给了子网但默认的IPV6地址是随机给的,非```::1```或```::a```结尾的情况
|
||||
- 重新设计虚拟机/容器的IPV6网关配置逻辑,适配宿主机的IPV6的gateway可能恰好是该子网第一个IPV6的情况
|
||||
|
||||
2023.11.25
|
||||
|
||||
- 放松IPV6的gateway判断条件,部分宿主机的gateway直接通过```ip -6 route add default via```加上去的还行,此时虽然fe80地址不通,但不影响v6使用
|
||||
|
|
|
@ -13,10 +13,9 @@
|
|||
|
||||
## 更新
|
||||
|
||||
2023.11.26
|
||||
2023.11.27
|
||||
|
||||
- 重新计算IPV6子网的前缀,适配宿主机虽然给了子网但默认的IPV6地址是随机给的,非```::1```或```::a```结尾的情况
|
||||
- 重新设计虚拟机/容器的IPV6网关配置逻辑,适配宿主机的IPV6的gateway可能恰好是该子网第一个IPV6的情况
|
||||
- 完善IPV6检测机制,尽量保证识别出准确的IPV6子网掩码和子网前缀,且尽量保证ndp可用
|
||||
|
||||
[更新日志](CHANGELOG.md)
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@ if grep -q "vmbr0" "/etc/network/interfaces"; then
|
|||
_blue "vmbr0 already exists in /etc/network/interfaces"
|
||||
_blue "vmbr0 已存在在 /etc/network/interfaces"
|
||||
else
|
||||
if [ -z "$ipv6_address" ] || [ -z "$ipv6_prefixlen" ] || [ -z "$ipv6_gateway" ]; then
|
||||
if [ -z "$ipv6_address" ] || [ -z "$ipv6_prefixlen" ] || [ -z "$ipv6_gateway" ] && [ ! -f /usr/local/bin/pve_last_ipv6 ]; then
|
||||
cat <<EOF | sudo tee -a /etc/network/interfaces
|
||||
auto vmbr0
|
||||
iface vmbr0 inet static
|
||||
|
@ -307,7 +307,7 @@ iface vmbr0 inet static
|
|||
bridge_stp off
|
||||
bridge_fd 0
|
||||
EOF
|
||||
elif [ -f "/usr/local/bin/iface_auto.txt" ]; then
|
||||
elif [ -f "/usr/local/bin/iface_auto.txt" ] && [ ! -f /usr/local/bin/pve_last_ipv6 ]; then
|
||||
cat <<EOF | sudo tee -a /etc/network/interfaces
|
||||
auto vmbr0
|
||||
iface vmbr0 inet static
|
||||
|
@ -319,6 +319,24 @@ iface vmbr0 inet static
|
|||
|
||||
iface vmbr0 inet6 auto
|
||||
bridge_ports $interface
|
||||
EOF
|
||||
elif [ -f /usr/local/bin/pve_last_ipv6 ]; then
|
||||
last_ipv6=$(cat /usr/local/bin/pve_last_ipv6)
|
||||
cat <<EOF | sudo tee -a /etc/network/interfaces
|
||||
auto vmbr0
|
||||
iface vmbr0 inet static
|
||||
address $ipv4_address
|
||||
gateway $ipv4_gateway
|
||||
bridge_ports $interface
|
||||
bridge_stp off
|
||||
bridge_fd 0
|
||||
|
||||
iface vmbr0 inet6 static
|
||||
address ${last_ipv6}
|
||||
gateway ${ipv6_gateway}
|
||||
|
||||
iface vmbr0 inet6 static
|
||||
address ${ipv6_address}/128
|
||||
EOF
|
||||
else
|
||||
cat <<EOF | sudo tee -a /etc/network/interfaces
|
||||
|
@ -331,14 +349,14 @@ iface vmbr0 inet static
|
|||
bridge_fd 0
|
||||
|
||||
iface vmbr0 inet6 static
|
||||
address ${ipv6_address}/${ipv6_prefixlen}
|
||||
gateway ${ipv6_gateway}
|
||||
address ${ipv6_address}/128
|
||||
gateway ${ipv6_gateway}
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
if [[ "${ipv6_gateway_fe80}" == "N" ]]; then
|
||||
chattr -i /etc/network/interfaces
|
||||
echo " up ip addr del $fe80_address dev $interface" >> /etc/network/interfaces
|
||||
echo " up ip addr del $fe80_address dev $interface" >> /etc/network/interfaces
|
||||
remove_duplicate_lines "/etc/network/interfaces"
|
||||
chattr -i /etc/network/interfaces
|
||||
fi
|
||||
|
|
|
@ -31,6 +31,9 @@ if [ $pct_status -eq 0 ] && [ $qm_status -eq 0 ]; then
|
|||
_green "Proxmox VE已经安装,无需重复安装。"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d /usr/local/bin ]; then
|
||||
mkdir -p /usr/local/bin
|
||||
fi
|
||||
|
||||
########## 备份配置文件
|
||||
|
||||
|
|
Loading…
Reference in a new issue