1#!/bin/sh 2 3. ${WORLDDIR}/release/tools/ec2.conf 4 5# Packages to install into the image we're creating. In addition to packages 6# present on all EC2 AMIs, we install cloud-init. 7export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} net/cloud-init" 8 9# Services to enable in rc.conf(5). 10export VM_RC_LIST="${VM_RC_LIST} cloudinit sshd" 11 12vm_extra_pre_umount() { 13 # Configuration common to all EC2 AMIs 14 ec2_common 15 16 # Configure cloud-init 17 cat <<-'EOF' > ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_ec2.cfg 18 disable_root: true 19 system_info: 20 distro: freebsd 21 default_user: 22 name: ec2-user 23 lock_passwd: True 24 groups: [wheel] 25 shell: /bin/sh 26 # Currently broken, cloud-init hard-codes to /usr/home/* 27 homedir: /home/ec2-user 28 EOF 29 30 return 0 31} 32