X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=chroot-script;fp=chroot-script;h=28653870282b392a9256ba41baa606cefb1cdfa9;hb=ad99b61111e1eeb20d56367e55d5b849b16c5de3;hp=3c69f005cdfabdf195b9a465d7997707ecf26ac2;hpb=2999d61efa6841d22024fc6c5fde16dc44db8a20;p=grml-debootstrap.git diff --git a/chroot-script b/chroot-script index 3c69f00..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