Update buildct.sh

This commit is contained in:
spiritlhl 2023-08-21 22:22:27 +08:00 committed by GitHub
parent 8b7b0a53b3
commit ef2a65826d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -245,7 +245,9 @@ pct set $CTID --hostname $CTID
if [ "$independent_ipv6" == "Y" ]; then
if [ "$ipv6_prefixlen" -le 64 ]; then
if [ ! -z "$ipv6_address" ] && [ ! -z "$ipv6_prefixlen" ] && [ ! -z "$ipv6_gateway" ] && [ ! -z "$ipv6_address_without_last_segment" ]; then
pct set $CTID --net0 name=eth0,ip6=${ipv6_address_without_last_segment}${CTID}/${ipv6_prefixlen},bridge=vmbr2,gw6=${ipv6_address_without_last_segment}2/${ipv6_prefixlen}
echo "${ipv6_address_without_last_segment}${CTID}/${ipv6_prefixlen}"
echo "${ipv6_address_without_last_segment}2/${ipv6_prefixlen}"
pct set $CTID --net0 name=eth0,ip6="${ipv6_address_without_last_segment}${CTID}/${ipv6_prefixlen}",bridge=vmbr2,gw6="${ipv6_address_without_last_segment}2/${ipv6_prefixlen}"
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
independent_ipv6_status="Y"