Compare commits

...

2 Commits

Author SHA1 Message Date
Sam Heinz b1eec90772 add helper function for get_arch_value 2026-06-12 20:02:52 +10:00
community-scripts-pr-app[bot] 9b5aab46bd Update CHANGELOG.md (#15069)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-12 08:59:41 +00:00
3 changed files with 23 additions and 1 deletions
+2 -1
View File
@@ -484,7 +484,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 🆕 New Scripts
- Alpine-Cinny ([#15044](https://github.com/community-scripts/ProxmoxVE/pull/15044))
- Twenty ([#15047](https://github.com/community-scripts/ProxmoxVE/pull/15047))
- Alpine-Cinny ([#15044](https://github.com/community-scripts/ProxmoxVE/pull/15044))
### 💾 Core
+1
View File
@@ -3838,6 +3838,7 @@ build_container() {
export ENABLE_TUN="$ENABLE_TUN"
export PCT_OSTYPE="$var_os"
export PCT_OSVERSION="$var_version"
export PCT_ARCH="$(dpkg --print-architecture 2>/dev/null || uname -m)"
export PCT_DISK_SIZE="$DISK_SIZE"
export IPV6_METHOD="$IPV6_METHOD"
export ENABLE_GPU="$ENABLE_GPU"
+20
View File
@@ -360,6 +360,26 @@ arch_check() {
fi
}
# ------------------------------------------------------------------------------
# get_arch_value()
#
# - Selects an architecture-specific value while preserving amd64 defaults
# - Usage: get_arch_value "amd64-value" "arm64-value"
# - Defaults: amd64="amd64", arm64="arm64"
# ------------------------------------------------------------------------------
get_arch_value() {
local amd64_val="${1:-amd64}"
local arm64_val="${2:-arm64}"
case "$PCT_ARCH" in
amd64) echo "$amd64_val" ;;
arm64) echo "$arm64_val" ;;
*)
msg_error "Unsupported architecture: $PCT_ARCH"
return 106
;;
esac
}
# ------------------------------------------------------------------------------
# ssh_check()
#