diff options
Diffstat (limited to 'src/chroot-tools/librechroot')
-rwxr-xr-x | src/chroot-tools/librechroot | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 2462f4b..52262c4 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -7,6 +7,7 @@ set -euE # Copyright (C) 2012 Michał Masłowski <mtjm@mtjm.eu> # Copyright (C) 2012-2018 Luke Shumaker <lukeshu@parabola.nu> # Copyright (C) 2018 Andreas Grapentin <andreas@grapentin.org> +# Copyright (C) 2020 bill-auger <bill-auger@programmer.net> # # License: GNU GPLv2+ # @@ -190,16 +191,17 @@ mkarchroot() { local cmd=( unshare -m "$_mkarchroot" - # mkarchroot flags: (flags are very similar to arch-nspawn) + # mkarchroot flags: + # * flags are very similar to arch-nspawn "${arch_nspawn_flags[@]}" # chroot directory: -- "$copydir" # pacman flags: # * hack around https://bugs.archlinux.org/task/49347 --hookdir="$copydir/etc/pacman.d/hooks" - # packages: (and maybe more flags... pacstrap injects - # flags at the end, so we can't turn of flag parsing - # with '--') + # packages: + # * and maybe more flags... pacstrap injects flags at the end, + # so we can't disable flag parsing with '--') "${pkgs[@]}" ) "${cmd[@]}" @@ -332,8 +334,7 @@ readonly commands=( # Globals: $CHROOTDIR, $CHROOT, $COPY, $rootdir and $copydir main() { - COPY=$LIBREUSER - [[ $COPY != root ]] || COPY=copy + COPY=$( [[ $LIBREUSER == root ]] && echo copy || echo "$LIBREUSER" ) declare -i retconf=0 load_conf chroot.conf CHROOTDIR CHROOT || retconf=$? @@ -482,7 +483,7 @@ main() { EOF # generate custom pacman.conf - sed -r \ + sed -r \ -e "s|^#?\\s*Architecture.+|Architecture = ${target_arch}|g" \ -e "s|^.*Include\s*=\s*/etc/pacman.d/.*\.conf|#&|" \ -e "N ; /${REPOS_HEADER}/ i ${VOLATILE_REPOS} \n\n" \ |