svn commit: r272795 - in projects/release-vmimage/release: amd64 i386

Glen Barber gjb at FreeBSD.org
Thu Oct 9 04:10:59 UTC 2014


Author: gjb
Date: Thu Oct  9 04:10:58 2014
New Revision: 272795
URL: https://svnweb.freebsd.org/changeset/base/272795

Log:
  Reference vm_prebuild_setup(), vm_setup(), and
  vm_postbuild_setup() functions.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/release-vmimage/release/amd64/mk-vmimage.sh
  projects/release-vmimage/release/i386/mk-vmimage.sh

Modified: projects/release-vmimage/release/amd64/mk-vmimage.sh
==============================================================================
--- projects/release-vmimage/release/amd64/mk-vmimage.sh	Thu Oct  9 03:50:38 2014	(r272794)
+++ projects/release-vmimage/release/amd64/mk-vmimage.sh	Thu Oct  9 04:10:58 2014	(r272795)
@@ -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
 }
 

Modified: projects/release-vmimage/release/i386/mk-vmimage.sh
==============================================================================
--- projects/release-vmimage/release/i386/mk-vmimage.sh	Thu Oct  9 03:50:38 2014	(r272794)
+++ projects/release-vmimage/release/i386/mk-vmimage.sh	Thu Oct  9 04:10:58 2014	(r272795)
@@ -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
 }
 


More information about the svn-src-projects mailing list