summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2011-08-18 16:00:32 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2011-08-18 16:00:32 +0000
commit691b854db3eb8e22939782fea46904b21d4b1555 (patch)
tree37b5ec0dbde72af280a295e343d1d62f598b0056 /usr.sbin/bsdinstall
parent74b897e2dc828e21a5c1ba03f09f1e291eb27d72 (diff)
downloadFreeBSD-src-691b854db3eb8e22939782fea46904b21d4b1555.zip
FreeBSD-src-691b854db3eb8e22939782fea46904b21d4b1555.tar.gz
Fix a bug that prevented docsinstall from being able to use DNS in most
cases and provide a better error handling mechanism during package installation. Approved by: re (kib)
Diffstat (limited to 'usr.sbin/bsdinstall')
-rw-r--r--usr.sbin/bsdinstall/scripts/docsinstall12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/docsinstall b/usr.sbin/bsdinstall/scripts/docsinstall
index e037dcc..e16116c 100644
--- a/usr.sbin/bsdinstall/scripts/docsinstall
+++ b/usr.sbin/bsdinstall/scripts/docsinstall
@@ -59,11 +59,21 @@ NB: This requires a working, configured network connection." 0 0 0 \
test $? -eq 0 || exit 0
exec 3>&-
+# Let pkg_add be able to use name servers
+cp ${BSDINSTALL_TMPETC}/resolv.conf ${BSDINSTALL_CHROOT}/etc
+
+error() {
+ dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox \
+ "Could not install package $1 (`tail -n 1 ${BSDINSTALL_LOG}`)" 0 0
+ exit 1
+}
+
+
clear
echo "FreeBSD Installer"
echo "========================"
echo
for i in $DOCS; do
- pkg_add -C ${BSDINSTALL_CHROOT} -r ${i}-freebsd-doc
+ pkg_add -C ${BSDINSTALL_CHROOT} -r ${i}-freebsd-doc || error $i-freebsd-doc
done
OpenPOWER on IntegriCloud