svn commit: r344315 - head/release/tools

Colin Percival cperciva at FreeBSD.org
Tue Feb 19 23:24:40 UTC 2019


Author: cperciva
Date: Tue Feb 19 23:24:39 2019
New Revision: 344315
URL: https://svnweb.freebsd.org/changeset/base/344315

Log:
  Fix sed script to insert Amazon NTP server into ntp.conf once rather
  than twice.
  
  Reported by:	Rafal Lukawiecki
  MFC after:	1 week

Modified:
  head/release/tools/ec2.conf

Modified: head/release/tools/ec2.conf
==============================================================================
--- head/release/tools/ec2.conf	Tue Feb 19 23:22:39 2019	(r344314)
+++ head/release/tools/ec2.conf	Tue Feb 19 23:24:39 2019	(r344315)
@@ -96,7 +96,7 @@ vm_extra_pre_umount() {
 
 	# Use the NTP service provided by Amazon
 	sed -i '' -e 's/^pool/#pool/' \
-		-e 's/^#server.*/server 169.254.169.123 iburst/' \
+		-e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \
 		${DESTDIR}/etc/ntp.conf
 
 	# The first time the AMI boots, the installed "first boot" scripts


More information about the svn-src-head mailing list