From f73686707d0117459611552211918982d933549e Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sun, 19 May 2024 03:31:08 +0000 Subject: [PATCH] 2024.05.19 --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- scripts/buildct.sh | 18 +++++++++--------- scripts/buildct_onlyv6.sh | 16 ++++++++-------- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b633d22..e65cdb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更新日志 +2024.05.15 + +- 指定额外子网的IPV4地址生成虚拟机时,强制指定虚拟机内的IPV4的子网掩码为/32 + 2024.05.13 - 较新的Ubuntu/Debian系统可能自带密码禁用验证策略,修复开放密码验证策略 diff --git a/README.md b/README.md index 5d07dcb..d775c3e 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ ## 更新 -2024.05.15 +2024.05.19 -- 指定额外子网的IPV4地址生成虚拟机时,强制指定虚拟机内的IPV4的子网掩码为/32 +- 修复开设PVE的ARM架构的LXC容器时指定系统版本检索错误的问题 [更新日志](CHANGELOG.md) diff --git a/scripts/buildct.sh b/scripts/buildct.sh index 07e8b42..21e4be8 100644 --- a/scripts/buildct.sh +++ b/scripts/buildct.sh @@ -1,7 +1,7 @@ #!/bin/bash # from # https://github.com/oneclickvirt/pve -# 2024.03.12 +# 2024.05.19 # ./buildct.sh CTID 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6 # ./buildct.sh 102 1234567 1 512 5 20001 20002 20003 30000 30025 debian11 local N @@ -114,17 +114,17 @@ if [ "$system_arch" = "arch" ]; then if [ $? -eq 0 ] && [ -n "$response" ]; then system_names+=($(echo "$response")) fi - ubuntu_versions=("16" "18" "20" "22" "23.04" "23.10" "24") - ubuntu_names=("xenial" "bionic" "focal" "jammy" "lunar" "mantic" "noble") - debian_versions=("10" "11" "12" "13" "sid") - debian_names=("buster" "bullseye" "bookworm" "trixie" "sid") + ubuntu_versions=("18.04" "20.04" "22.04" "23.04" "23.10" "24.04") + ubuntu_names=("bionic" "focal" "jammy" "lunar" "mantic" "noble") + debian_versions=("10" "11" "12" "13") + debian_names=("buster" "bullseye" "bookworm" "trixie") version="" if [ "$en_system" = "ubuntu" ]; then # 转换ubuntu系统的代号为对应名字 for ((i=0; i<${#ubuntu_versions[@]}; i++)); do if [ "${ubuntu_versions[$i]}" = "$num_system" ]; then version="${ubuntu_names[$i]}" - system_name="${en_system}-arm64-${version}-cloud.tar.xz" + system_name="${en_system}_${ubuntu_versions[$i]}_${ubuntu_names[$i]}_arm64_cloud.tar.xz" break fi done @@ -133,20 +133,20 @@ if [ "$system_arch" = "arch" ]; then for ((i=0; i<${#debian_versions[@]}; i++)); do if [ "${debian_versions[$i]}" = "$num_system" ]; then version="${debian_names[$i]}" - system_name="${en_system}-arm64-${version}-cloud.tar.xz" + system_name="${en_system}_${debian_versions[$i]}_${debian_names[$i]}_arm64_cloud.tar.xz" break fi done elif [ -z $num_system ]; then # 适配无指定版本的系统 for ((i=0; i<${#system_names[@]}; i++)); do - if [[ "${system_names[$i]}" == "${en_system}-arm64-"* ]]; then + if [[ "${system_names[$i]}" == "${en_system}_"* ]]; then system_name="${system_names[$i]}" break fi done else - system_name="${en_system}-arm64-${version}-cloud.tar.xz" + system_name="${en_system}_${version}_${version}_arm64_cloud.tar.xz" fi if [ ${#system_names[@]} -eq 0 ] && [ -z "$system_name" ]; then _red "No suitable system names found." diff --git a/scripts/buildct_onlyv6.sh b/scripts/buildct_onlyv6.sh index e836357..d3b122e 100644 --- a/scripts/buildct_onlyv6.sh +++ b/scripts/buildct_onlyv6.sh @@ -122,17 +122,17 @@ if [ "$system_arch" = "arch" ]; then if [ $? -eq 0 ] && [ -n "$response" ]; then system_names+=($(echo "$response")) fi - ubuntu_versions=("16" "18" "20" "22" "23.04" "23.10" "24") - ubuntu_names=("xenial" "bionic" "focal" "jammy" "lunar" "mantic" "noble") - debian_versions=("10" "11" "12" "13" "sid") - debian_names=("buster" "bullseye" "bookworm" "trixie" "sid") + ubuntu_versions=("18.04" "20.04" "22.04" "23.04" "23.10" "24.04") + ubuntu_names=("bionic" "focal" "jammy" "lunar" "mantic" "noble") + debian_versions=("10" "11" "12" "13") + debian_names=("buster" "bullseye" "bookworm" "trixie") version="" if [ "$en_system" = "ubuntu" ]; then # 转换ubuntu系统的代号为对应名字 for ((i=0; i<${#ubuntu_versions[@]}; i++)); do if [ "${ubuntu_versions[$i]}" = "$num_system" ]; then version="${ubuntu_names[$i]}" - system_name="${en_system}-arm64-${version}-cloud.tar.xz" + system_name="${en_system}_${ubuntu_versions[$i]}_${ubuntu_names[$i]}_arm64_cloud.tar.xz" break fi done @@ -141,20 +141,20 @@ if [ "$system_arch" = "arch" ]; then for ((i=0; i<${#debian_versions[@]}; i++)); do if [ "${debian_versions[$i]}" = "$num_system" ]; then version="${debian_names[$i]}" - system_name="${en_system}-arm64-${version}-cloud.tar.xz" + system_name="${en_system}_${debian_versions[$i]}_${debian_names[$i]}_arm64_cloud.tar.xz" break fi done elif [ -z $num_system ]; then # 适配无指定版本的系统 for ((i=0; i<${#system_names[@]}; i++)); do - if [[ "${system_names[$i]}" == "${en_system}-arm64-"* ]]; then + if [[ "${system_names[$i]}" == "${en_system}_"* ]]; then system_name="${system_names[$i]}" break fi done else - system_name="${en_system}-arm64-${version}-cloud.tar.xz" + system_name="${en_system}_${version}_${version}_arm64_cloud.tar.xz" fi if [ ${#system_names[@]} -eq 0 ] && [ -z "$system_name" ]; then _red "No suitable system names found."