File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1714,6 +1714,27 @@ function get_lxc_ip() {
17141714 export LOCAL_IP
17151715}
17161716
1717+ # ------------------------------------------------------------------------------
1718+ # arch_resolve()
1719+ #
1720+ # - Selects an architecture-specific value while preserving amd64 defaults
1721+ # - Usage: arch_resolve "amd64-value" "arm64-value"
1722+ # - Defaults: amd64="amd64", arm64="arm64"
1723+ # ------------------------------------------------------------------------------
1724+ arch_resolve () {
1725+ local amd64_val=" ${1:- amd64} "
1726+ local arm64_val=" ${2:- arm64} "
1727+ local arch=" ${PCT_ARCH:- $(dpkg --print-architecture 2>/ dev/ null || uname -m)} "
1728+ case " $arch " in
1729+ amd64 | x86_64) echo " $amd64_val " ;;
1730+ arm64 | aarch64) echo " $arm64_val " ;;
1731+ * )
1732+ msg_error " Unsupported architecture: $arch "
1733+ return 106
1734+ ;;
1735+ esac
1736+ }
1737+
17171738# ==============================================================================
17181739# SIGNAL TRAPS
17191740# ==============================================================================
You can’t perform that action at this time.
0 commit comments