From 40e750acde300f0a66972a0e9ee527c2393ea97d Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sun, 18 Feb 2024 10:45:07 +0000 Subject: [PATCH] 2024.02.18 --- README.md | 2 +- scripts/buildct.sh | 2 -- scripts/buildct_onlyv6.sh | 8 +++----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 84b3029..d0ed535 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ 2024.02.18 - 修复低版本PVE删除非企业订阅弹窗可能失效的问题 -- 测试发现ARM架构下纯IPV6的容器开设有问题,待修复 +- 尝试修复ARM架构下纯IPV6的容器开设有问题 [更新日志](CHANGELOG.md) diff --git a/scripts/buildct.sh b/scripts/buildct.sh index 16f09c6..21029d3 100644 --- a/scripts/buildct.sh +++ b/scripts/buildct.sh @@ -305,8 +305,6 @@ else fi pct start $CTID pct set $CTID --hostname $CTID -# # 删除原始配置避免重启容器后出现内网IPV4错配的情况 -# pct exec $CTID -- sed -i '/auto eth0/,$d' /etc/network/interfaces if [ "$independent_ipv6" == "y" ]; then if [ ! -z "$host_ipv6_address" ] && [ ! -z "$ipv6_prefixlen" ] && [ ! -z "$ipv6_gateway" ] && [ ! -z "$ipv6_address_without_last_segment" ]; then if grep -q "vmbr2" /etc/network/interfaces; then diff --git a/scripts/buildct_onlyv6.sh b/scripts/buildct_onlyv6.sh index b30be4c..3b4e0fd 100644 --- a/scripts/buildct_onlyv6.sh +++ b/scripts/buildct_onlyv6.sh @@ -1,7 +1,7 @@ #!/bin/bash # from # https://github.com/spiritLHLS/pve -# 2024.02.17 +# 2024.02.18 # ./buildct_onlyv6.sh CTID 密码 CPU核数 内存 硬盘 系统 存储盘 # ./buildct_onlyv6.sh 102 1234567 1 512 5 debian11 local @@ -263,6 +263,8 @@ fi if [ -f /usr/local/bin/pve_ipv6_gateway ]; then ipv6_gateway=$(cat /usr/local/bin/pve_ipv6_gateway) fi + +user_ip="172.16.1.${num}" if [ "$system_arch" = "x86" ]; then if [ "$fixed_system" = true ]; then pct create $CTID /var/lib/vz/template/cache/$system_name -cores $core -cpuunits 1024 -memory $memory -swap 128 -rootfs ${storage}:${disk} -onboot 1 -password $password -features nesting=1 @@ -275,10 +277,6 @@ else fi pct start $CTID pct set $CTID --hostname $CTID -# # 删除原始配置避免重启容器后出现内网IPV4错配的情况 -# pct exec $CTID -- sed -i '/auto eth0/,$d' /etc/network/interfaces -# arm架构下纯IPV6开设有问题 -user_ip="172.16.1.${num}" pct set $CTID --net0 name=eth0,ip6="${ipv6_address_without_last_segment}${CTID}/128",bridge=vmbr2,gw6="${host_ipv6_address}" pct set $CTID --net1 name=eth1,ip=${user_ip}/24,bridge=vmbr1,gw=172.16.1.1 pct set $CTID --nameserver 8.8.8.8,2001:4860:4860::8888 --nameserver 8.8.4.4,2001:4860:4860::8844