Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Mar 2017 01:26:10 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314935 - head/release/tools
Message-ID:  <201703090126.v291QATA063165@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703090126.v291QATA063165>