Skip to content

Commit c6767ff

Browse files
committed
added some detection logic for Archecture "any"
1 parent 670b285 commit c6767ff

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

gen_cloud_template.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ _init_image() {
227227
local mount_dev=""
228228
local mount_target=""
229229
local packages_from_file=""
230+
[ "${PROJECTARCH}" == "any" ] && PROJECTARCH=$(uname -m) # if "Any" is used for archecture, use whatever the running kernel is compiled for
230231
[ -f ${PACKAGE_LIST_FILE} ] && packages_from_file=$( parse_package_file "${TARGET}/${PACKAGE_LIST_FILE}" )
231232

232233
message "Performing Initial Install"
@@ -246,6 +247,7 @@ _init_image() {
246247
as_root pacstrap "${mount_point}" ${KERNEL} ${BOOTLOADER} ${ARCH_BASE_PACKAGES} ${EXTRAPACKAGES} ${packages_from_file} || exit_with_error 1 "Base Arch Linux install failed. Please check output."
247248
;;
248249
debian|ubuntu)
250+
[ "${PROJECTARCH}" == "x86_64" ] && PROJECTARCH="amd64" # Arch uses x86_64, the same output as uname -m. Debian calls this amd64. Debian substitution for "any" to work.
249251
# check if debootstrap is installed
250252
which debootstrap &> /dev/null || exit_with_error 2 "debootstrap is not installed, may not initialize Debian based environments"
251253
# debootstrap needs a comma seperated list of packages

0 commit comments

Comments
 (0)