diff options
| author | 2022-08-05 18:06:24 -0400 | |
|---|---|---|
| committer | 2022-08-05 18:06:24 -0400 | |
| commit | e0b06ff704a19dadee4e73887bd225a35e864ad5 (patch) | |
| tree | 31bd115e6a07043483c59db1984e52a86ff5f9ae /arch-chroot.in | |
| parent | 3f6e3062bfec066b4af21fc19a2c906ce5c757e2 (diff) | |
| parent | 64bb46311547cb5ea13d3d8f7d0d1836f33a68f5 (diff) | |
Update upstream source from tag 'upstream/26'
Update to upstream version '26'
with Debian dir 99b018b2286e84a419731a347b93bce98f900ad2
Diffstat (limited to 'arch-chroot.in')
| -rw-r--r-- | arch-chroot.in | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch-chroot.in b/arch-chroot.in index bcb38df..3bf6523 100644 --- a/arch-chroot.in +++ b/arch-chroot.in @@ -5,7 +5,7 @@ shopt -s extglob m4_include(common) setup=chroot_setup -unshare="$root_unshare" +unshare=0 usage() { cat <<EOF @@ -82,7 +82,7 @@ while getopts ':hNu:' flag; do ;; N) setup=unshare_setup - unshare="$user_unshare" + unshare=1 ;; u) userspec=$OPTARG @@ -116,8 +116,12 @@ arch-chroot() { chroot_args=() [[ $userspec ]] && chroot_args+=(--userspec "$userspec") - SHELL=/bin/bash chroot "${chroot_args[@]}" -- "$chrootdir" "${args[@]}" + SHELL=/bin/bash $pid_unshare chroot "${chroot_args[@]}" -- "$chrootdir" "${args[@]}" } args=("$@") -$unshare bash -c "$(declare_all); arch-chroot" +if (( unshare )); then + $mount_unshare bash -c "$(declare_all); arch-chroot" +else + arch-chroot +fi |
