#!/bin/sh12. ${WORLDDIR}/release/tools/ec2.conf34# Packages to install into the image we're creating. In addition to packages5# present on all EC2 AMIs, we install:6# * amazon-ssm-agent (not enabled by default, but some users need to use7# it on systems not connected to the internet),8# * ec2-scripts, which provides a range of EC2ification startup scripts,9# * firstboot-freebsd-update, to install security updates at first boot,10# * firstboot-pkgs, to install packages at first boot, and11# * isc-dhcp44-client, used for IPv6 network setup.12export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent ec2-scripts \13firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client"1415# Services to enable in rc.conf(5).16export VM_RC_LIST="${VM_RC_LIST} ec2_configinit ec2_ephemeral_swap \17ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs \18growfs sshd"1920vm_extra_pre_umount() {21# The AWS CLI tools are generally useful, and small enough that they22# will download quickly; but users will often override this setting23# via EC2 user-data.24echo 'firstboot_pkgs_list="devel/py-awscli"' >> ${DESTDIR}/etc/rc.conf2526# Any EC2 ephemeral disks seen when the system first boots will27# be "new" disks; there is no "previous boot" when they might have28# been seen and used already.29touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen3031# Configuration common to all EC2 AMIs32ec2_common3334# Standard FreeBSD network configuration35ec2_base_networking3637return 038}394041