X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=chroot-script;h=2f6efbad39deeb8f01eec09f728e81f3aa454e6c;hb=670035bdde9ac232b3869eea4a66f5412d1d1132;hp=5cff4847a6a6ea6810af3f211d24ee9b3753e343;hpb=5825f1a6c7839df6585b1d962415f8ae3dc3c9c2;p=grml-debootstrap.git diff --git a/chroot-script b/chroot-script index 5cff484..2f6efba 100755 --- a/chroot-script +++ b/chroot-script @@ -269,14 +269,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 } # }}} @@ -325,8 +332,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