summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2013-01-27 23:12:37 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2013-01-27 23:12:37 +0000
commit4006779c7a56867016924fa95f9de9d42772115e (patch)
treefbd31a3c7935fe726e7f0998970607b1a271f375 /usr.sbin
parent15607eb86a5921dfebfd82136f84bd84626646d2 (diff)
downloadFreeBSD-src-4006779c7a56867016924fa95f9de9d42772115e.zip
FreeBSD-src-4006779c7a56867016924fa95f9de9d42772115e.tar.gz
If no resolv.conf has been made for the new system already and the install
media has one already, copy it in lieu of leaving things blank. This reduces the foot-shooting potential for PXE installs that immediately add packages.
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/script5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script
index 47aee77..58ae6e9 100755
--- a/usr.sbin/bsdinstall/scripts/script
+++ b/usr.sbin/bsdinstall/scripts/script
@@ -68,6 +68,11 @@ bsdinstall distextract
# Finalize install
bsdinstall config
+# Make sure networking is functional, if we can arrange that
+if [ ! -f $BSDINSTALL_CHROOT/etc/resolv.conf -a -f /etc/resolv.conf ]; then
+ cp /etc/resolv.conf $BSDINSTALL_CHROOT/etc/resolv.conf
+fi
+
# Run post-install script
if [ -f /tmp/bsdinstall-installscript-ab ]; then
cp /tmp/bsdinstall-installscript-ab $BSDINSTALL_CHROOT/tmp/installscript
OpenPOWER on IntegriCloud