support chroots without an /etc/resolv.conf

This commit is contained in:
Dave Reisner 2015-07-04 16:26:49 -04:00
parent 69081c9e7e
commit 1b8f4b542c

View File

@ -33,6 +33,9 @@ chroot_add_resolv_conf() {
if [[ ! -f $resolv_conf ]]; then
install -Dm644 /dev/null "$resolv_conf" || return 1
fi
elif [[ ! -e $chrootdir/etc/resolv.conf ]]; then
# The chroot might not have a resolv.conf.
return 0
fi
chroot_add_mount /etc/resolv.conf "$resolv_conf" --bind