aboutsummaryrefslogtreecommitdiff
path: root/release/amd64
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-10-09 04:10:58 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-10-09 04:10:58 +0000
commit648326ad2d336d041c6d8163cb095c7b0a7efb20 (patch)
treeaad4588a835508025ecc2f2fd34015763516d85a /release/amd64
parent4ac2ee7f8cd558a55cb042114d5a0e168ac86d23 (diff)
downloadsrc-648326ad2d336d041c6d8163cb095c7b0a7efb20.tar.gz
src-648326ad2d336d041c6d8163cb095c7b0a7efb20.zip
Reference vm_prebuild_setup(), vm_setup(), and
vm_postbuild_setup() functions. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-vmimage/; revision=272795
Diffstat (limited to 'release/amd64')
-rwxr-xr-xrelease/amd64/mk-vmimage.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/release/amd64/mk-vmimage.sh b/release/amd64/mk-vmimage.sh
index 05c103a1f4a7..de233163d6de 100755
--- a/release/amd64/mk-vmimage.sh
+++ b/release/amd64/mk-vmimage.sh
@@ -92,6 +92,9 @@ panic() {
}
vm_create_baseimage() {
+ # Run anything that is needed before the virtual machine disk image
+ # is created.
+ vm_prebuild_setup
# Creates the UFS root filesystem for the virtual machine disk,
# written to the formatted disk image with mkimg(1).
#
@@ -125,6 +128,9 @@ vm_create_baseimage() {
>> ${DESTDIR}/etc/fstab
echo '/dev/gpt/swapfs none swap sw 0 0' \
>> ${DESTDIR}/etc/fstab
+ # Run anything that is needed while the virtual machine disk image
+ # userland filesystem is still mounted as a md(4) device.
+ vm_setup
sync
while ! umount ${DESTDIR}; do
i=$(( $i + 1 ))
@@ -184,6 +190,9 @@ vm_create_vmdisk() {
-p freebsd-ufs/rootfs:=${VMBASE} \
-o ${VMIMAGE}
+ # Run anything that is needed for the virtual machine disk image
+ # after it has been created.
+ vm_postbuild_setup
return 0
}