From 140a57ca164d8d5cfc6bfa47be38b2af053b3875 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 29 Aug 2023 00:48:00 +0000 Subject: [PATCH] 2023.08.29 --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- scripts/install_pve.sh | 12 +++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15b6015..7508021 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更新日志 +2023.08.27 + +- 将删除物理网关的操作移动到创建vmbr0之前,而不是原来的创建vmbr1之前 + 2023.08.26 - 修复开设NAT网关时,vmbr0如果不存在就去补全时的漏洞,尝试支持第一第二步安装PVE不使用本仓库脚本的PVE创建NAT网关 diff --git a/README.md b/README.md index 186a8ff..d05d210 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ ## 更新 -2023.08.27 +2023.08.29 -- 将删除物理网关的操作移动到创建vmbr0之前,而不是原来的创建vmbr1之前 +- 判断IPV6是否未dhcp类型,如果是则检测是否已分配IPV6地址,如果未分配则删除对应配置避免冲突 [更新日志](CHANGELOG.md) diff --git a/scripts/install_pve.sh b/scripts/install_pve.sh index 2899984..a2f5481 100644 --- a/scripts/install_pve.sh +++ b/scripts/install_pve.sh @@ -1,7 +1,7 @@ #!/bin/bash # from # https://github.com/spiritLHLS/pve -# 2023.08.26 +# 2023.08.29 ########## 预设部分输出和部分中间变量 @@ -1155,6 +1155,16 @@ if [[ $dmidecode_output == *"Hetzner_vServer"* ]] || [[ $dmidecode_output == *"M fi fi +# 检测IPV6是不是启用了dhcp但未分配IPV6地址 +if [ -z "$ipv6_address" ] || [ -z "$ipv6_prefixlen" ] || [ -z "$ipv6_gateway" ]; then + if [ -f /etc/network/if-pre-up.d/cloud_inet6 ]; then + rm -rf /etc/network/if-pre-up.d/cloud_inet6 + fi + chattr -i /etc/network/interfaces + sed -i '/iface ens4 inet6 \(manual\|dhcp\)/d' /etc/network/interfaces + chattr +i /etc/network/interfaces +fi + # 部分机器中途service丢失了,尝试修复 install_package service