summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/chroot-tools/librechroot11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index ad052b4..1667d98 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -5,7 +5,7 @@ set -euE
# Copyright (C) 2010-2012 Nicolás Reynolds <fauno@parabola.nu>
# Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
# Copyright (C) 2012 Michał Masłowski <mtjm@mtjm.eu>
-# Copyright (C) 2012-2017 Luke Shumaker <lukeshu@sbcglobal.net>
+# Copyright (C) 2012-2018 Luke Shumaker <lukeshu@sbcglobal.net>
#
# License: GNU GPLv2+
#
@@ -73,16 +73,17 @@ hack_arch_nspawn_flags() {
# We're running an ARM chroot on a non-ARM processor
# Make sure that qemu-static is set up with binfmt_misc
- if [[ $(grep -c -xF \
- -e 'enabled' \
+ if [[ -z $(grep -l -xF \
-e 'interpreter /usr/bin/qemu-arm-static' \
- /proc/sys/fs/binfmt_misc/arm 2>/dev/null) -lt 2 ]]; then
+ -r -- /proc/sys/fs/binfmt_misc 2>/dev/null \
+ | xargs -r grep -xF 'enabled') ]]
+ then
error 'Cannot cross-compile for ARM on x86'
plain 'This requires a binfmt_misc entry for qemu-arm-static.'
prose 'Such a binfmt_misc entry is provided by the %s
package. If you have it installed, but still see
this message, you may need to restart %s.' \
- binfmt-qemu-static systemd-binfmt.service
+ qemu-user-static-binfmt systemd-binfmt.service
return $EXIT_NOTINSTALLED
fi