mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
MFC r323812:
Bootstrap etcupdate(8) and mergemaster(8) databases when creating virtual machine images and embedded images, similar to what is done when extracting base.txz to the target root filesystem in a new installation. Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
7314c098cc
commit
27f984e9b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=323815
@ -99,6 +99,16 @@ arm_install_base() {
|
||||
TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \
|
||||
DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \
|
||||
installworld installkernel distribution
|
||||
|
||||
# Bootstrap etcupdate(8) and mergemaster(8) databases.
|
||||
mkdir -p ${DESTDIR}/var/db/etcupdate
|
||||
etcupdate extract -B \
|
||||
-M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \
|
||||
-s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate
|
||||
sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \
|
||||
-F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \
|
||||
-D ${DESTDIR}
|
||||
|
||||
chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos
|
||||
|
||||
arm_create_user
|
||||
|
@ -116,6 +116,15 @@ vm_install_base() {
|
||||
installworld installkernel distribution || \
|
||||
err "\n\nCannot install the base system to ${DESTDIR}."
|
||||
|
||||
# Bootstrap etcupdate(8) and mergemaster(8) databases.
|
||||
mkdir -p ${DESTDIR}/var/db/etcupdate
|
||||
etcupdate extract -B \
|
||||
-M "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \
|
||||
-s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate
|
||||
sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \
|
||||
-F "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \
|
||||
-D ${DESTDIR}
|
||||
|
||||
echo '# Custom /etc/fstab for FreeBSD VM images' \
|
||||
> ${DESTDIR}/etc/fstab
|
||||
echo '/dev/gpt/rootfs / ufs rw 1 1' \
|
||||
|
Loading…
Reference in New Issue
Block a user