aboutsummaryrefslogtreecommitdiff
path: root/release/tools
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2022-06-08 22:45:41 +0000
committerColin Percival <cperciva@FreeBSD.org>2022-06-08 22:50:30 +0000
commit1d2e46d40861aff2e4f3147e7a242e7bc808978e (patch)
treeb13181123deb13a011cbc8fc27e77c4d549432f6 /release/tools
parenta39a5a6905612447def27b66ffe73b9d11efd80c (diff)
downloadsrc-1d2e46d40861aff2e4f3147e7a242e7bc808978e.tar.gz
src-1d2e46d40861aff2e4f3147e7a242e7bc808978e.zip
EC2: Enable ephemeral swap by default
The latest version of the ec2-scripts package includes a completely rewritten "use EC2 ephemeral disks for swap space" script. Now that we have something which works on recent versions of FreeBSD, turn it on since it's a great way to use the ephemeral disks. Note that the option for controlling this, ec2_ephemeral_swap_enable, is not the same as the option (ec2_ephemeralswap_enable) used with the previous ephemeral-swap script; this change was deliberate to avoid astonishment for users who upgraded their ec2-scripts package and had a setting left behind in rc.conf.
Diffstat (limited to 'release/tools')
-rw-r--r--release/tools/ec2.conf7
1 files changed, 6 insertions, 1 deletions
diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
index 5be4937379a0..a61b711c24ce 100644
--- a/release/tools/ec2.conf
+++ b/release/tools/ec2.conf
@@ -19,7 +19,7 @@ if [ "${TARGET_ARCH}" = "amd64" ]; then
fi
# Set to a list of third-party software to enable in rc.conf(5).
-export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd dev_aws_disk"
+export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd dev_aws_disk ec2_ephemeral_swap"
# Build with a 4.9 GB UFS partition; the growfs rc.d script will expand
# the partition to fill the root disk after the EC2 instance is launched.
@@ -164,6 +164,11 @@ EOF
# * firstboot_pkgs (install packages)
touch ${DESTDIR}/firstboot
+ # Any EC2 ephemeral disks seen when the system first boots will
+ # be "new" disks; there is no "previous boot" when they might have
+ # been seen and used already.
+ touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen
+
if ! [ -z "${QEMUSTATIC}" ]; then
rm -f ${DESTDIR}/${EMULATOR}
fi