svn commit: r314935 - head/release/tools

Andrew Thompson thompsa at FreeBSD.org
Thu Mar 9 01:26:12 UTC 2017


Author: thompsa
Date: Thu Mar  9 01:26:10 2017
New Revision: 314935
URL: https://svnweb.freebsd.org/changeset/base/314935

Log:
  ec2.conf and vmimage.subr can be used from the installation livecd after
  install to prepare an AMI image. This can be used to create a ZFS AMI disk
  image using a virtual machine.
  
  Change ec2.conf to use the pkg tool from a chroot rather than trying to
  bootstrap it and fail from the livecd readonly filesystem.
  
  Reviewed by:	gjb

Modified:
  head/release/tools/ec2.conf

Modified: head/release/tools/ec2.conf
==============================================================================
--- head/release/tools/ec2.conf	Thu Mar  9 01:21:28 2017	(r314934)
+++ head/release/tools/ec2.conf	Thu Mar  9 01:26:10 2017	(r314935)
@@ -32,7 +32,8 @@ vm_extra_pre_umount() {
 	# catalogue and install or update pkg when the instance first
 	# launches, so these files would just be replaced anyway; removing
 	# them from the image allows it to boot faster.
-	env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg
+	chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \
+		/usr/sbin/pkg delete -f -y pkg
 	rm ${DESTDIR}/var/db/pkg/repo-*.sqlite
 
 	# The size of the EC2 root disk can be configured at instance launch


More information about the svn-src-all mailing list