mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-09-12 17:24:34 +08:00
2023.08.27
This commit is contained in:
parent
0a037f728f
commit
37ad2397c9
4 changed files with 55 additions and 27 deletions
|
@ -1,5 +1,10 @@
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
2023.08.26
|
||||||
|
|
||||||
|
- 修复开设NAT网关时,vmbr0如果不存在就去补全时的漏洞,尝试支持第一第二步安装PVE不使用本仓库脚本的PVE创建NAT网关
|
||||||
|
- 给IPV6的识别增加ping检测,如果ping不通当作IPV6不通,避免有的商家设置的IPV6本身就有问题根本用不了还配置,导致安装出问题
|
||||||
|
|
||||||
2023.08.23
|
2023.08.23
|
||||||
|
|
||||||
- ndppd增加ARM架构的支持
|
- ndppd增加ARM架构的支持
|
||||||
|
|
|
@ -13,10 +13,9 @@
|
||||||
|
|
||||||
## 更新
|
## 更新
|
||||||
|
|
||||||
2023.08.26
|
2023.08.27
|
||||||
|
|
||||||
- 修复开设NAT网关时,vmbr0如果不存在就去补全时的漏洞,尝试支持第一第二步安装PVE不使用本仓库脚本的PVE创建NAT网关
|
- 将删除物理网关的操作移动到创建vmbr0之前,而不是原来的创建vmbr1之前
|
||||||
- 给IPV6的识别增加ping检测,如果ping不通当作IPV6不通,避免有的商家设置的IPV6本身就有问题根本用不了还配置,导致安装出问题
|
|
||||||
|
|
||||||
[更新日志](CHANGELOG.md)
|
[更新日志](CHANGELOG.md)
|
||||||
|
|
||||||
|
|
|
@ -357,26 +357,28 @@ if [ -f "/usr/local/bin/ndpresponder" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 删除可能存在的原有的网卡配置
|
# 删除可能存在的原有的网卡配置
|
||||||
cp /etc/network/interfaces /etc/network/interfaces_nat.bak
|
if [ ! -f /etc/network/interfaces_nat.bak ]; then
|
||||||
chattr -i /etc/network/interfaces
|
cp /etc/network/interfaces /etc/network/interfaces_nat.bak
|
||||||
input_file="/etc/network/interfaces"
|
chattr -i /etc/network/interfaces
|
||||||
output_file="/etc/network/interfaces.tmp"
|
input_file="/etc/network/interfaces"
|
||||||
start_pattern="iface lo inet loopback"
|
output_file="/etc/network/interfaces.tmp"
|
||||||
end_pattern="auto vmbr0"
|
start_pattern="iface lo inet loopback"
|
||||||
delete_lines=0
|
end_pattern="auto vmbr0"
|
||||||
while IFS= read -r line; do
|
delete_lines=0
|
||||||
if [[ $line == *"$start_pattern"* ]]; then
|
while IFS= read -r line; do
|
||||||
delete_lines=1
|
if [[ $line == *"$start_pattern"* ]]; then
|
||||||
fi
|
delete_lines=1
|
||||||
if [ $delete_lines -eq 0 ] || [[ $line == *"$start_pattern"* ]] || [[ $line == *"$end_pattern"* ]]; then
|
fi
|
||||||
echo "$line" >>"$output_file"
|
if [ $delete_lines -eq 0 ] || [[ $line == *"$start_pattern"* ]] || [[ $line == *"$end_pattern"* ]]; then
|
||||||
fi
|
echo "$line" >>"$output_file"
|
||||||
if [[ $line == *"$end_pattern"* ]]; then
|
fi
|
||||||
delete_lines=0
|
if [[ $line == *"$end_pattern"* ]]; then
|
||||||
fi
|
delete_lines=0
|
||||||
done <"$input_file"
|
fi
|
||||||
mv "$output_file" "$input_file"
|
done <"$input_file"
|
||||||
chattr +i /etc/network/interfaces
|
mv "$output_file" "$input_file"
|
||||||
|
chattr +i /etc/network/interfaces
|
||||||
|
fi
|
||||||
|
|
||||||
# 已加载网络,删除对应缓存文件
|
# 已加载网络,删除对应缓存文件
|
||||||
if [ -f "/etc/network/interfaces.new" ]; then
|
if [ -f "/etc/network/interfaces.new" ]; then
|
||||||
|
|
|
@ -802,9 +802,9 @@ if [ ! -f /usr/local/bin/pve_ipv6_prefixlen ] || [ ! -s /usr/local/bin/pve_ipv6_
|
||||||
fi
|
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
|
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)
|
ipv6_gateway=$(ip -6 route show | awk '/default via/{print $3}' | head -n1)
|
||||||
if [[ "${ipv6_gateway: -2}" == "::" ]]; then
|
# if [[ "${ipv6_gateway: -2}" == "::" ]]; then
|
||||||
ipv6_gateway="${ipv6_gateway}0000"
|
# ipv6_gateway="${ipv6_gateway}0000"
|
||||||
fi
|
# fi
|
||||||
echo "$ipv6_gateway" >/usr/local/bin/pve_ipv6_gateway
|
echo "$ipv6_gateway" >/usr/local/bin/pve_ipv6_gateway
|
||||||
fi
|
fi
|
||||||
ipv6_address=$(cat /usr/local/bin/pve_check_ipv6)
|
ipv6_address=$(cat /usr/local/bin/pve_check_ipv6)
|
||||||
|
@ -1205,7 +1205,7 @@ iface vmbr0 inet static
|
||||||
bridge_fd 0
|
bridge_fd 0
|
||||||
|
|
||||||
iface vmbr0 inet6 static
|
iface vmbr0 inet6 static
|
||||||
address ${ipv6_address_without_last_segment}/128
|
address ${ipv6_address_without_last_segment}:1/128
|
||||||
gateway ${ipv6_gateway}
|
gateway ${ipv6_gateway}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -1239,6 +1239,28 @@ if [ ! -s "/etc/resolv.conf" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 删除可能存在的原有的网卡配置
|
||||||
|
cp /etc/network/interfaces /etc/network/interfaces_nat.bak
|
||||||
|
chattr -i /etc/network/interfaces
|
||||||
|
input_file="/etc/network/interfaces"
|
||||||
|
output_file="/etc/network/interfaces.tmp"
|
||||||
|
start_pattern="iface lo inet loopback"
|
||||||
|
end_pattern="auto vmbr0"
|
||||||
|
delete_lines=0
|
||||||
|
while IFS= read -r line; do
|
||||||
|
if [[ $line == *"$start_pattern"* ]]; then
|
||||||
|
delete_lines=1
|
||||||
|
fi
|
||||||
|
if [ $delete_lines -eq 0 ] || [[ $line == *"$start_pattern"* ]] || [[ $line == *"$end_pattern"* ]]; then
|
||||||
|
echo "$line" >>"$output_file"
|
||||||
|
fi
|
||||||
|
if [[ $line == *"$end_pattern"* ]]; then
|
||||||
|
delete_lines=0
|
||||||
|
fi
|
||||||
|
done <"$input_file"
|
||||||
|
mv "$output_file" "$input_file"
|
||||||
|
chattr +i /etc/network/interfaces
|
||||||
|
|
||||||
# 安装必备模块并替换apt源中的无效订阅
|
# 安装必备模块并替换apt源中的无效订阅
|
||||||
cp /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
|
cp /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
|
||||||
# echo "deb http://download.proxmox.com/debian/pve $(lsb_release -sc) pve-no-subscription" > /etc/apt/sources.list.d/pve-enterprise.list
|
# echo "deb http://download.proxmox.com/debian/pve $(lsb_release -sc) pve-no-subscription" > /etc/apt/sources.list.d/pve-enterprise.list
|
||||||
|
|
Loading…
Add table
Reference in a new issue