Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 2010 16:34:52 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203200 - head/etc/rc.d
Message-ID:  <201001301634.o0UGYqhS046689@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ume
Date: Sat Jan 30 16:34:52 2010
New Revision: 203200
URL: http://svn.freebsd.org/changeset/base/203200

Log:
  Allow use of -6 option to "server" and "peer" in ntp.conf.
  
  MFC after:	1 week

Modified:
  head/etc/rc.d/ntpdate

Modified: head/etc/rc.d/ntpdate
==============================================================================
--- head/etc/rc.d/ntpdate	Sat Jan 30 15:53:32 2010	(r203199)
+++ head/etc/rc.d/ntpdate	Sat Jan 30 16:34:52 2010	(r203200)
@@ -19,7 +19,9 @@ ntpdate_start()
 	if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then
 		ntpdate_hosts=`awk '
 			/^server[ \t]*127.127/      {next}
-			/^(server|peer)/            {print $2}
+			/^(server|peer)/            {
+			    if ($2 ~/^-/)           {print $3}
+			    else                    {print $2}}
 		' < ${ntpdate_config}`
 	fi
 	if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then



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