summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/chroot-tools/librechroot19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index cf564ed..90f364e 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-2016 Luke Shumaker <lukeshu@sbcglobal.net>
+# Copyright (C) 2012-2017 Luke Shumaker <lukeshu@sbcglobal.net>
#
# License: GNU GPLv2+
#
@@ -31,20 +31,19 @@ set -euE
# - the case statement in main() that runs them
. "$(librelib conf)"
-load_files chroot
-
-. libremessages
+. "$(librelib messages)"
shopt -s nullglob
umask 0022
+load_files chroot
+
################################################################################
# Wrappers for files in ${pkglibexecdir}/chroot/ #
################################################################################
readonly _arch_nspawn="$(librelib chroot/arch-nspawn)"
readonly _mkarchroot="$(librelib chroot/mkarchroot)"
-readonly _makechrootpkg="$(librelib chroot/makechrootpkg.sh)"
arch_nspawn_flags=()
sysd_nspawn_flags=()
@@ -71,7 +70,7 @@ hack_arch_nspawn_flags() {
CARCH="$(uname -m)"
fi
- if [[ "$CARCH" == armv7h ]] && ! setarch armv7l 2>/dev/null; then
+ if [[ "$CARCH" == armv7h ]] && ! setarch armv7l /bin/true 2>/dev/null; then
# We're running an ARM chroot on a non-ARM processor
# Make sure that qemu-static is set up with binfmt_misc
@@ -80,9 +79,11 @@ hack_arch_nspawn_flags() {
-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
+ 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
return 1
fi