2024.05.19

This commit is contained in:
spiritlhl 2024-05-19 03:31:08 +00:00
parent c2a147384a
commit f73686707d
4 changed files with 23 additions and 19 deletions

View file

@ -1,5 +1,9 @@
# 更新日志 # 更新日志
2024.05.15
- 指定额外子网的IPV4地址生成虚拟机时强制指定虚拟机内的IPV4的子网掩码为/32
2024.05.13 2024.05.13
- 较新的Ubuntu/Debian系统可能自带密码禁用验证策略修复开放密码验证策略 - 较新的Ubuntu/Debian系统可能自带密码禁用验证策略修复开放密码验证策略

View file

@ -12,9 +12,9 @@
## 更新 ## 更新
2024.05.15 2024.05.19
- 指定额外子网的IPV4地址生成虚拟机时强制指定虚拟机内的IPV4的子网掩码为/32 - 修复开设PVE的ARM架构的LXC容器时指定系统版本检索错误的问题
[更新日志](CHANGELOG.md) [更新日志](CHANGELOG.md)

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# from # from
# https://github.com/oneclickvirt/pve # https://github.com/oneclickvirt/pve
# 2024.03.12 # 2024.05.19
# ./buildct.sh CTID 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6 # ./buildct.sh CTID 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6
# ./buildct.sh 102 1234567 1 512 5 20001 20002 20003 30000 30025 debian11 local N # ./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 if [ $? -eq 0 ] && [ -n "$response" ]; then
system_names+=($(echo "$response")) system_names+=($(echo "$response"))
fi fi
ubuntu_versions=("16" "18" "20" "22" "23.04" "23.10" "24") ubuntu_versions=("18.04" "20.04" "22.04" "23.04" "23.10" "24.04")
ubuntu_names=("xenial" "bionic" "focal" "jammy" "lunar" "mantic" "noble") ubuntu_names=("bionic" "focal" "jammy" "lunar" "mantic" "noble")
debian_versions=("10" "11" "12" "13" "sid") debian_versions=("10" "11" "12" "13")
debian_names=("buster" "bullseye" "bookworm" "trixie" "sid") debian_names=("buster" "bullseye" "bookworm" "trixie")
version="" version=""
if [ "$en_system" = "ubuntu" ]; then if [ "$en_system" = "ubuntu" ]; then
# 转换ubuntu系统的代号为对应名字 # 转换ubuntu系统的代号为对应名字
for ((i=0; i<${#ubuntu_versions[@]}; i++)); do for ((i=0; i<${#ubuntu_versions[@]}; i++)); do
if [ "${ubuntu_versions[$i]}" = "$num_system" ]; then if [ "${ubuntu_versions[$i]}" = "$num_system" ]; then
version="${ubuntu_names[$i]}" 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 break
fi fi
done done
@ -133,20 +133,20 @@ if [ "$system_arch" = "arch" ]; then
for ((i=0; i<${#debian_versions[@]}; i++)); do for ((i=0; i<${#debian_versions[@]}; i++)); do
if [ "${debian_versions[$i]}" = "$num_system" ]; then if [ "${debian_versions[$i]}" = "$num_system" ]; then
version="${debian_names[$i]}" 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 break
fi fi
done done
elif [ -z $num_system ]; then elif [ -z $num_system ]; then
# 适配无指定版本的系统 # 适配无指定版本的系统
for ((i=0; i<${#system_names[@]}; i++)); do 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]}" system_name="${system_names[$i]}"
break break
fi fi
done done
else else
system_name="${en_system}-arm64-${version}-cloud.tar.xz" system_name="${en_system}_${version}_${version}_arm64_cloud.tar.xz"
fi fi
if [ ${#system_names[@]} -eq 0 ] && [ -z "$system_name" ]; then if [ ${#system_names[@]} -eq 0 ] && [ -z "$system_name" ]; then
_red "No suitable system names found." _red "No suitable system names found."

View file

@ -122,17 +122,17 @@ if [ "$system_arch" = "arch" ]; then
if [ $? -eq 0 ] && [ -n "$response" ]; then if [ $? -eq 0 ] && [ -n "$response" ]; then
system_names+=($(echo "$response")) system_names+=($(echo "$response"))
fi fi
ubuntu_versions=("16" "18" "20" "22" "23.04" "23.10" "24") ubuntu_versions=("18.04" "20.04" "22.04" "23.04" "23.10" "24.04")
ubuntu_names=("xenial" "bionic" "focal" "jammy" "lunar" "mantic" "noble") ubuntu_names=("bionic" "focal" "jammy" "lunar" "mantic" "noble")
debian_versions=("10" "11" "12" "13" "sid") debian_versions=("10" "11" "12" "13")
debian_names=("buster" "bullseye" "bookworm" "trixie" "sid") debian_names=("buster" "bullseye" "bookworm" "trixie")
version="" version=""
if [ "$en_system" = "ubuntu" ]; then if [ "$en_system" = "ubuntu" ]; then
# 转换ubuntu系统的代号为对应名字 # 转换ubuntu系统的代号为对应名字
for ((i=0; i<${#ubuntu_versions[@]}; i++)); do for ((i=0; i<${#ubuntu_versions[@]}; i++)); do
if [ "${ubuntu_versions[$i]}" = "$num_system" ]; then if [ "${ubuntu_versions[$i]}" = "$num_system" ]; then
version="${ubuntu_names[$i]}" 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 break
fi fi
done done
@ -141,20 +141,20 @@ if [ "$system_arch" = "arch" ]; then
for ((i=0; i<${#debian_versions[@]}; i++)); do for ((i=0; i<${#debian_versions[@]}; i++)); do
if [ "${debian_versions[$i]}" = "$num_system" ]; then if [ "${debian_versions[$i]}" = "$num_system" ]; then
version="${debian_names[$i]}" 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 break
fi fi
done done
elif [ -z $num_system ]; then elif [ -z $num_system ]; then
# 适配无指定版本的系统 # 适配无指定版本的系统
for ((i=0; i<${#system_names[@]}; i++)); do 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]}" system_name="${system_names[$i]}"
break break
fi fi
done done
else else
system_name="${en_system}-arm64-${version}-cloud.tar.xz" system_name="${en_system}_${version}_${version}_arm64_cloud.tar.xz"
fi fi
if [ ${#system_names[@]} -eq 0 ] && [ -z "$system_name" ]; then if [ ${#system_names[@]} -eq 0 ] && [ -z "$system_name" ]; then
_red "No suitable system names found." _red "No suitable system names found."