diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-10 22:23:25 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-11 13:02:28 -0400 |
commit | dfad28ac247a2cb319de4cb3c91421344c3382d0 (patch) | |
tree | 3c2c2d71e045d4cdad8ac3eabb3f94aa0bb94c40 /src/chroot-tools/librechroot | |
parent | 15e40d85a64d5fc0965a229385e6c0b3ec5ad28b (diff) |
librechroot: Tidy up.
Diffstat (limited to 'src/chroot-tools/librechroot')
-rwxr-xr-x | src/chroot-tools/librechroot | 19 |
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 |