Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Aug 2015 05:47:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 202354] base ntpdate rc.d script does not use pool lines as possible hosts for ntpdate
Message-ID:  <bug-202354-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202354

            Bug ID: 202354
           Summary: base ntpdate rc.d script does not use pool lines as
                    possible hosts for ntpdate
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: dereks@lifeofadishwasher.com

Created attachment 159913
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=159913&action=edit
ntpdate rc.d script to use pool configation line

10.2-RELEASE introduces ntpd 4.2.8p3.  With this /etc/ntp.conf can now use the
pool configuration command.

The base ntpdate rc.d script only looks for server and peer lines:

 ...
 ntpdate_hosts=`awk '
   /^server[ \t]*127.127/      {next}
   /^(server|peer)/            {
       if ($2 ~/^-/)           {print $3}
       else                    {print $2}}
 ' < "$ntpdate_config"`
 ...

Should also include lines that begin with pool?

ntp.conf using pool with base ntpdate rc.d script:

 # ntpd --version
 ntpd 4.2.8p3-a (1) 
 # egrep "^(server|peer|pool)" /etc/ntp.conf
 pool north-america.pool.ntp.org iburst
 # service ntpdate start
 Setting date via ntp.
 16 Aug 01:12:00 ntpdate[68397]: no servers can be used, exiting

With patch:

 # fgrep 'pool' /etc/rc.d/ntpdate
                         /^(server|peer|pool)/            {


 # service ntpdate start
 Setting date via ntp.
 16 Aug 01:16:13 ntpdate[68591]: step time server 72.29.161.5 offset -0.002298
sec

-- 
You are receiving this mail because:
You are the assignee for the bug.



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