#!/bin/sh12. ${WORLDDIR}/release/tools/ec2.conf34# Build with a 4.9 GB partition; the growfs rc.d script will expand5# the partition to fill the root disk after the EC2 instance is launched.6# Note that if this is set to <N>G, we will end up with an <N+1> GB disk7# image since VMSIZE is the size of the filesystem partition, not the disk8# which it resides within. (This overrides the default in ec2.conf.)9export VMSIZE=5000m1011# Flags to installworld/kernel: We don't want debug symbols (kernel or12# userland), 32-bit libraries, tests, or the debugger.13export INSTALLOPTS="WITHOUT_DEBUG_FILES=YES WITHOUT_KERNEL_SYMBOLS=YES \14WITHOUT_LIB32=YES WITHOUT_TESTS=YES WITHOUT_LLDB=YES"1516# Packages to install into the image we're creating. In addition to packages17# present on all EC2 AMIs, we install:18# * ec2-scripts, which provides a range of EC2ification startup scripts,19# * firstboot-freebsd-update, to install security updates at first boot,20# * firstboot-pkgs, to install packages at first boot, and21# * isc-dhcp44-client, used for IPv6 network setup.22export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \23firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client"2425# Services to enable in rc.conf(5).26export VM_RC_LIST="${VM_RC_LIST} ec2_configinit ec2_ephemeral_swap \27ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs \28growfs sshd"2930vm_extra_pre_umount() {31# Any EC2 ephemeral disks seen when the system first boots will32# be "new" disks; there is no "previous boot" when they might have33# been seen and used already.34touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen3536# Configuration common to all EC2 AMIs37ec2_common3839# Standard FreeBSD network configuration40ec2_base_networking4142return 043}444546