X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=chroot-script;h=367ed9b7ff7fb8c28f113a53344c0f221adf8599;hb=dc0052a90daceefe39aad25ff51b2bfb5abc9c4f;hp=3c69f005cdfabdf195b9a465d7997707ecf26ac2;hpb=2999d61efa6841d22024fc6c5fde16dc44db8a20;p=grml-debootstrap.git diff --git a/chroot-script b/chroot-script index 3c69f00..367ed9b 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 } # }}} @@ -317,17 +324,16 @@ get_kernel_version() { # shellcheck disable=SC2153 case "$ARCH" in i386) - case "$RELEASE" in - lenny|squeeze|wheezy) KARCH='686' ;; - # since jessie the linux-image-686 image doesn't exist any longer - *) KARCH='686-pae' ;; - esac + KARCH='686-pae' ;; 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