summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2017-01-26 04:44:18 +0000
committercperciva <cperciva@FreeBSD.org>2017-01-26 04:44:18 +0000
commitc810b9890f96e4c2e99985c18dfb3dd6a4301741 (patch)
treefebe55e914917c31fe390726d6cd98e46395b657
parent98865c5f18ecb1941d6b5594a95268fa4aab201c (diff)
downloadFreeBSD-src-c810b9890f96e4c2e99985c18dfb3dd6a4301741.zip
FreeBSD-src-c810b9890f96e4c2e99985c18dfb3dd6a4301741.tar.gz
MFC r312214: Enable IPv6 on EC2 AMIs.
-rw-r--r--release/tools/ec2.conf11
1 files changed, 8 insertions, 3 deletions
diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
index a273449..1ece644 100644
--- a/release/tools/ec2.conf
+++ b/release/tools/ec2.conf
@@ -6,7 +6,7 @@
# Packages to install into the image we're creating. This is a deliberately
# minimalist set, providing only the packages necessary to bootstrap further
# package installation as specified via EC2 user-data.
-export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs"
+export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient"
# Set to a list of third-party software to enable in rc.conf(5).
export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs"
@@ -39,8 +39,9 @@ vm_extra_pre_umount() {
# time; expand our filesystem to fill the disk.
echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf
- # EC2 instances use DHCP to get their network configuration.
- echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf
+ # EC2 instances use DHCP to get their network configuration. IPv6
+ # requires accept_rtadv.
+ echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf
# Unless the system has been configured via EC2 user-data, the user
# will need to SSH in to do anything.
@@ -51,6 +52,10 @@ vm_extra_pre_umount() {
# via EC2 user-data.
echo 'firstboot_pkgs_list="awscli"' >> ${DESTDIR}/etc/rc.conf
+ # Enable IPv6 on all interfaces, and use DHCP on both IPv4 and IPv6.
+ echo 'ipv6_activate_all_interfaces="YES"' >> ${DESTDIR}/etc/rc.conf
+ echo 'dhclient_program="/usr/local/sbin/dual-dhclient"' >> ${DESTDIR}/etc/rc.conf
+
# The EC2 console is output-only, so while printing a backtrace can
# be useful, there's no point dropping into a debugger or waiting
# for a keypress.
OpenPOWER on IntegriCloud