Subject: bin/4073: /etc/rc not finding default hosts for ntpdate properly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mason@primenet.com.au>
List: netbsd-bugs
Date: 09/01/1997 21:52:18
>Number:         4073
>Category:       bin
>Synopsis:       /etc/rc not finding default hosts for ntpdate properly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep  1 15:05:01 1997
>Last-Modified:
>Originator:     Geoff Wing
>Organization:
Geoff Wing [mason@primenet.com.au]                   Phone    : +61-3-9818 2977 
 Technical Manager: PrimeNet Computer Consultants    Facsimile: +61-3-9768 2909
 Web: <URL:http://www.primenet.com.au/>              Mobile   : 0412 162 441
        [ Boulderdash: <URL:http://ciips.ee.uwa.edu.au/~williams/bd/> ]
>Release:        -current
>Environment:
System: NetBSD coral.primenet.com.au 1.2G NetBSD 1.2G (CORAL) #0: Fri Aug 29 22:27:39 EST 1997 root@coral.primenet.com.au:/src/netbsd/src/sys/arch/i386/compile/CORAL i386


>Description:
	/etc/rc.conf says
ntpdate=NO		ntpdate_hosts=""	# blank: hosts in /etc/ntp.conf
	but /etc/rc says
if [ "$ntpdate_hosts" = DEFAULT ]; then

>How-To-Repeat:
	inspection
>Fix:
-z or ! -n  test

*** src/etc/rc.org	Tue Sep  2 07:43:42 1997
--- src/etc/rc	Tue Sep  2 07:44:49 1997
***************
*** 145,151 ****
  
  # set time, if requested
  if checkyesno ntpdate; then
! 	if [ "$ntpdate_hosts" = DEFAULT ]; then
  		ntpdate_hosts=`awk '/^server/ {print $2}' </etc/ntp.conf`
  	fi
  	if [ -n "$ntpdate_hosts"  ]; then
--- 145,151 ----
  
  # set time, if requested
  if checkyesno ntpdate; then
! 	if [ -z "$ntpdate_hosts" ]; then
  		ntpdate_hosts=`awk '/^server/ {print $2}' </etc/ntp.conf`
  	fi
  	if [ -n "$ntpdate_hosts"  ]; then
>Audit-Trail:
>Unformatted: