diff options
Diffstat (limited to 'arch-chroot.in')
| -rw-r--r-- | arch-chroot.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch-chroot.in b/arch-chroot.in index a954953..bfb83a3 100644 --- a/arch-chroot.in +++ b/arch-chroot.in @@ -19,6 +19,8 @@ EOF chroot_add_resolv_conf() { local chrootdir=$1 resolv_conf=$1/etc/resolv.conf + [[ -e /etc/resolv.conf ]] || return 0 + # Handle resolv.conf as a symlink to somewhere else. if [[ -L $chrootdir/etc/resolv.conf ]]; then # readlink(1) should always give us *something* since we know at this point @@ -73,6 +75,5 @@ chroot_add_resolv_conf "$chrootdir" || die "failed to setup resolv.conf" chroot_args=() [[ $userspec ]] && chroot_args+=(--userspec "$userspec") -chroot_args+=("$chrootdir" "$@") -SHELL=/bin/bash unshare --fork --pid chroot "${chroot_args[@]}" +SHELL=/bin/bash unshare --fork --pid chroot "${chroot_args[@]}" -- "$chrootdir" "$@" |
