Subject: bin/17930: ntpd.conf's multicastclient setting support for /etc/rc.d/ntpdate
To: None <gnats-bugs@gnats.netbsd.org>
From: Stoned Elipot <seb@runabout.rega.pbox.org>
List: netbsd-bugs
Date: 08/13/2002 17:44:59
>Number: 17930
>Category: bin
>Synopsis: ntpd.conf's multicastclient setting support for /etc/rc.d/ntpdate
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Aug 13 09:07:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Stoned Elipot
>Release: NetBSD 1.6D, with today's source
>Organization:
Mine
>Environment:
System: NetBSD runabout 1.6D NetBSD 1.6D (RUNABOUT) #0: Fri Jul 12 00:18:29 UTC 2002 root@runabout:/usr/u/seb/src/RUNABOUT/compile i386
Architecture: i386
Machine: i386
>Description:
Using ntpd in multicast client is easy to configure but you still need
to adjust $ntpdate_hosts if you want ntpdate to be run.
The proposed patch makes /etc/rc.d/ntpdate able to take use of
the 'multicastclient' client setting from /etc/ntp.conf so setting
$ntpdate_hosts is no more required in an "all" multicast NTP setup.
Both default value of NTP.MCAST.NET and custom multicast address are suported.
>How-To-Repeat:
N/A
>Fix:
Index: ntpdate
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/ntpdate,v
retrieving revision 1.9
diff -u -r1.9 ntpdate
--- ntpdate 2002/07/19 03:22:09 1.9
+++ ntpdate 2002/08/13 15:52:38
@@ -19,6 +19,11 @@
ntpdate_hosts=`awk '
/^(server|peer)[ \t]*127.127/ {next}
/^(server|peer)/ {print $2}
+ /^multicastclient/ {if (NF == 1)
+ print "224.0.1.1"
+ else
+ print $2
+ }
' </etc/ntp.conf`
fi
if [ -n "$ntpdate_hosts" ]; then
>Release-Note:
>Audit-Trail:
>Unformatted: