#!/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 amazon-ssm-agent and cloud-init.6export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent net/cloud-init"78# Services to enable in rc.conf(5).9export VM_RC_LIST="${VM_RC_LIST} cloudinit sshd"1011vm_extra_pre_umount() {12# Configuration common to all EC2 AMIs13ec2_common1415# Configure cloud-init16cat <<-'EOF' > ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_ec2.cfg17disable_root: true18system_info:19distro: freebsd20default_user:21name: ec2-user22lock_passwd: True23groups: [wheel]24shell: /bin/sh25homedir: /home/ec2-user26doas:27- permit nopass ec2-user28EOF2930return 031}323334