summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/chroot-tools/librechroot9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 7cfe125..a386861 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -71,16 +71,17 @@ hack_arch_nspawn_flags() {
fi
if [[ "$CARCH" == armv7h ]] && ! setarch armv7l 2>/dev/null; then
- if grep -xF 'enabled' /proc/sys/fs/binfmt_misc/arm &>/dev/null \
- && grep -xF 'interpreter /usr/bin/qemu-arm-static' /proc/sys/fs/binfmt_misc/arm &>/dev/null; then
- arch_nspawn_flags+=(-f /usr/bin/qemu-arm-static -s)
- else
+ if [[ $(grep -xF \
+ -e 'enabled'\
+ -e 'interpreter /usr/bin/qemu-arm-static' \
+ /proc/sys/fs/binfmt_misc/arm 2>/dev/null |wc -l) -lt 2 ]]; then
error 'Cannot cross-compile for ARM on x86'
plain 'This requires a binfmt_misc entry for qemu-arm-static,'
plain 'which is provided by the %s package.' binfmt-qemu-static
plain 'If you have this, you may need to restart %s.' systemd-binfmt.service
return 1
fi
+ arch_nspawn_flags+=(-f /usr/bin/qemu-arm-static -s)
fi
}