From 781cf3aa0d3f9a93d84481833f5c83aa9ee68ac0 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 28 Aug 2018 19:52:15 -0400 Subject: New upstream version 19 --- arch-chroot.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch-chroot.in') 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" "$@" -- cgit v1.2.3