aboutsummaryrefslogtreecommitdiffstats
path: root/arch-chroot.in
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-08-28 19:52:16 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-08-28 19:52:16 -0400
commit1f2387b88802d6eef8e69c3daf67d625a8a052f5 (patch)
treef7066dcfa6ed3505941bb0c93fadf1b885b16161 /arch-chroot.in
parentd385c01a1b149ed297f063687d9d5198a98fa21a (diff)
parent781cf3aa0d3f9a93d84481833f5c83aa9ee68ac0 (diff)
Update upstream source from tag 'upstream/19'
Update to upstream version '19' with Debian dir 9e264db6694270b5ecb0557fd17ea706e9084c8a
Diffstat (limited to 'arch-chroot.in')
-rw-r--r--arch-chroot.in5
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" "$@"