ARCH is not available in .chroot hooks so we need to get the architecture manually.

This commit is contained in:
Łukasz 'sil2100' Zemczak 2019-01-18 16:58:08 +01:00
parent 033bab8473
commit dbdf9e4a00
2 changed files with 12 additions and 1 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
livecd-rootfs (2.525.14) UNRELEASED; urgency=medium
* More changes for raspi3 build support (LP: #1805668):
- Fix 100-purge-grub-legacy-ec2-arm.chroot to not gate on ARCH as that's
not defined in .chroot hooks.
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Fri, 18 Jan 2019 16:56:58 +0100
livecd-rootfs (2.525.13) bionic; urgency=medium
[ Balint Reczey ]

View File

@ -1,7 +1,10 @@
#!/bin/sh -eux
# Only execute the hack for ARM images
if [ "$ARCH" != "armhf" ] && [ "$ARCH" != "arm64" ]; then
# ARCH is not available in .chroot hooks so we need to get the architecture
# manually.
arch=$(dpkg --print-architecture)
if [ "$arch" != "armhf" ] && [ "$arch" != "arm64" ]; then
exit 0
fi