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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to