Subject: install/9853: /etc/rc.d/ntpdate should REQUIRE dhclient
To: None <gnats-bugs@gnats.netbsd.org>
From: None <erik@mediator.uni-c.dk>
List: netbsd-bugs
Date: 04/10/2000 06:49:44
>Number:         9853
>Category:       install
>Synopsis:       /etc/rc.d/ntpdate should REQUIRE dhclient
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 10 06:24:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Erik Bertelsen
>Release:        NetBSD-current 9 apr 2000
>Organization:
	
>Environment:
	
System: NetBSD vrod.uni-c.dk 1.4X NetBSD 1.4X (VROD) #6: Mon Apr 10 14:24:39 CEST 2000 erik@vrod.uni-c.dk:/home/NetBSD/src/sys/arch/i386/compile/VROD i386


>Description:
	I have a machine with two interfaces, where for curious reasons
	the connection to the broader world is via the interface that
	is configured via dhclient.

	In this scenario, ntpdate will happily be started long before
	dhclient has run, which causes ntpdate to not work, as the default
	gateway has not yet been defined.
>How-To-Repeat:
>Fix:
	Add dhclient to ntpdate's REQUIREments. I don't see any problems
	in doing so (except possibly that more scripts may run before the
	time is correct).

	Another possibility was to force dhclient to run at about the same
	time as network (e.g. by making a pseudo rc.d entry like NETWORK
	that is required by those scripts that now require network, and
	then having NETWORK requiring network, dhclient, and possibly
	some other network related scripts).
diff -c /etc/rc.d/ntpdate ./ntpdate
*** /etc/rc.d/ntpdate	Mon Apr  3 17:48:33 2000
--- ./ntpdate	Sun Mar 12 16:42:14 2000
***************
*** 4,10 ****
  #
  
  # PROVIDE: ntpdate
! # REQUIRE: syslogd network dhclient
  
  . /etc/rc.subr
  . /etc/rc.conf
--- 4,10 ----
  #
  
  # PROVIDE: ntpdate
! # REQUIRE: syslogd network
  
  . /etc/rc.subr
  . /etc/rc.conf

regards
Erik Bertelsen
>Release-Note:
>Audit-Trail:
>Unformatted: