Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Dec 2017 00:47:45 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r326892 - stable/11/release/tools
Message-ID:  <201712160047.vBG0ljHu082585@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Sat Dec 16 00:47:45 2017
New Revision: 326892
URL: https://svnweb.freebsd.org/changeset/base/326892

Log:
  MFC r326565: Make EC2 instances use Amazon's NTP service for time
  synchronization.
  
  Relnotes:	EC2 instances now keep their clocks synchronized using
  		the Amazon Time Sync Service (aka. NTP).

Modified:
  stable/11/release/tools/ec2.conf
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/release/tools/ec2.conf
==============================================================================
--- stable/11/release/tools/ec2.conf	Sat Dec 16 00:44:11 2017	(r326891)
+++ stable/11/release/tools/ec2.conf	Sat Dec 16 00:47:45 2017	(r326892)
@@ -9,7 +9,7 @@
 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"
+export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd"
 
 # Build with a 2 GB UFS partition; the growfs rc.d script will expand
 # the partition to fill the root disk after the EC2 instance is launched.
@@ -80,6 +80,11 @@ vm_extra_pre_umount() {
 
 	# Load the kernel module for the Amazon "Elastic Network Adapter"
 	echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf
+
+	# Use the NTP service provided by Amazon
+	sed -i '' -e 's/^pool/#pool/' \
+		-e 's/^#server.*/server 169.254.169.123 iburst/' \
+		${DESTDIR}/etc/ntp.conf
 
 	# The first time the AMI boots, the installed "first boot" scripts
 	# should be allowed to run:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712160047.vBG0ljHu082585>