summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/scripts
diff options
context:
space:
mode:
authorallanjude <allanjude@FreeBSD.org>2015-03-18 23:24:38 +0000
committerallanjude <allanjude@FreeBSD.org>2015-03-18 23:24:38 +0000
commit19ab8c6fb0f888da93bb137ba8663603511ed332 (patch)
tree2d1cead3516f3990de12c88918643e4a2a58db95 /usr.sbin/bsdinstall/scripts
parent3617a765edf9abddb6e9b21fc729cc108c3046a2 (diff)
downloadFreeBSD-src-19ab8c6fb0f888da93bb137ba8663603511ed332.zip
FreeBSD-src-19ab8c6fb0f888da93bb137ba8663603511ed332.tar.gz
Fix the handbook install option in bsdinstall
bsdconfig's f_package_add doesn't seem to support using the pkg repo from /etc/pkg/FreeBSD.conf, it also tries to run the commands on the installer image, not in the destination chroot Instead, manually bootstrap pkg in the chroot, and then install the requested packages (in the chroot) Doesn't use pkg -c, because pkg is not installed on the installer image PR: 196250 Differential Revision: https://reviews.freebsd.org/D2026 Approved by: bapt Sponsored by: ScaleEngine Inc.
Diffstat (limited to 'usr.sbin/bsdinstall/scripts')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/docsinstall9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/docsinstall b/usr.sbin/bsdinstall/scripts/docsinstall
index f0bc8f5..821cf12 100755
--- a/usr.sbin/bsdinstall/scripts/docsinstall
+++ b/usr.sbin/bsdinstall/scripts/docsinstall
@@ -151,13 +151,20 @@ f_dialog_menutag_fetch selected
# Let pkg_add be able to use name servers
f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/
+if [ ! -x $BSDINSTALL_CHROOT ]; then
+ ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg bootstrap
+fi
+
#
# Install each of the selected packages
#
+docsets=""
for lang in $selected; do
- f_package_add $lang-freebsd-doc || return $FAILURE
+ docsets="$docsets $lang-freebsd-doc"
done
+ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install $docsets || return $FAILURE
+
################################################################################
# END
################################################################################
OpenPOWER on IntegriCloud