X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=chroot-script;h=28653870282b392a9256ba41baa606cefb1cdfa9;hb=89f05ac9ca3438d0080a5c3878f5caf93da04e58;hp=6655cb35b08cb2faf56cc22565cd3a2f714ced0c;hpb=1e27d8ed79cf72dbb999e7fb51ff0bf92a4c3383;p=grml-debootstrap.git diff --git a/chroot-script b/chroot-script index 6655cb3..2865387 100755 --- a/chroot-script +++ b/chroot-script @@ -270,14 +270,21 @@ packages() { } if [ "$PACKAGES" = 'yes' ] ; then - if ! [ -r /etc/debootstrap/packages ] ; then - echo "Error: /etc/debootstrap/packages (inside chroot) not found, exiting." >&2 - exit 1 - else - $APTUPDATE - # shellcheck disable=SC2086,SC2046 - DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $(grep -v '^#' /etc/debootstrap/packages) $GRMLPACKAGES - fi + PACKAGES_FILE="/etc/debootstrap/packages" + + if [ "$ARCH" = 'arm64' ]; then + PACKAGES_FILE="/etc/debootstrap/packages-arm64" + fi + + if ! [ -r "${PACKAGES_FILE}" ] ; then + echo "Error: ${PACKAGES_FILE} (inside chroot) not found, exiting." >&2 + exit 1 + else + $APTUPDATE + + # shellcheck disable=SC2086,SC2046 + DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $(grep -v '^#' "${PACKAGES_FILE}") $GRMLPACKAGES + fi fi } # }}} @@ -326,8 +333,11 @@ get_kernel_version() { amd64) KARCH='amd64' ;; + arm64) + KARCH='arm64' + ;; *) - echo "Only i386 and amd64 are currently supported" >&2 + echo "Only i386, amd64 and arm64 are currently supported" >&2 return 1 esac @@ -654,7 +664,7 @@ available_ids() { echo "${ids}" } -# helper function to report corresponding /dev/disk/by-id/… for a given device name, +# helper function to report corresponding /dev/disk/by-id/ for a given device name, # based on GRUB's postinst script device_to_id() { local id