Subject: misc/10350: dhclient doesn't start at an appropriate time with rc.d
To: None <gnats-bugs@gnats.netbsd.org>
From: Scott Reynolds <scottr@plexus.com>
List: netbsd-bugs
Date: 06/12/2000 16:26:11
>Number:         10350
>Category:       misc
>Synopsis:       dhclient doesn't start at an appropriate time with rc.d
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 12 16:27:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD-current 2000-06-12
>Organization:
Scott Reynolds
Systems Administrator
PLEXUS Technology Group
>Environment:
	NetBSD/mac68k, though that doesn't matter
System: NetBSD pawn 1.4Z NetBSD 1.4Z (GENERIC) #326: Tue May 30 23:14:08 CDT 2000 scottr@polka:/a/src/sys/arch/mac68k/compile/GENERIC mac68k


>Description:
	When starting up the system, rcorder correctly determines (from
	what it knows) that dhclient should be started late in the process.
	Unfortunately, this means a non-netbooted machine with only one
	DHCP-configured network interface won't be able to start properly.
	Clearly, dhclient needs to run at or around the time that network
	interfaces are configured.

>How-To-Repeat:
	Try to use dhclient by configuring rc.conf appropriately.  Note
	that many network-related daemons fail because the network
	interface hasn't been configured.

>Fix:
	The attached diff that gets things running again, but is incorrect
	because it causes dhclient to run before systemfs.  This results
	in the loss of dhclient.pid.

Index: basesrc/etc/rc.d/DAEMON
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/DAEMON,v
retrieving revision 1.1
diff -c -r1.1 DAEMON
*** DAEMON	2000/03/13 04:03:52	1.1
--- DAEMON	2000/06/12 22:55:07
***************
*** 5,11 ****
  
  # PROVIDE: DAEMON
  # REQUIRE: named sysctl cleartmp ldconfig accounting amd virecover ypbind
! # REQUIRE: ipnat ipmon savecore pwcheck quota databases network dmesg
  # REQUIRE: aftermountlkm nfslocking
  
  #	This is a dummy dependancy, to ensure that daemons are run
--- 5,11 ----
  
  # PROVIDE: DAEMON
  # REQUIRE: named sysctl cleartmp ldconfig accounting amd virecover ypbind
! # REQUIRE: ipnat ipmon savecore pwcheck quota databases network dhclient dmesg
  # REQUIRE: aftermountlkm nfslocking
  
  #	This is a dummy dependancy, to ensure that daemons are run
Index: basesrc/etc/rc.d/dhclient
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/dhclient,v
retrieving revision 1.5
diff -c -r1.5 dhclient
*** dhclient	2000/05/26 20:44:17	1.5
--- dhclient	2000/06/12 22:55:07
***************
*** 4,10 ****
  #
  
  # PROVIDE: dhclient
! # REQUIRE: systemfs syslogd
  
  . /etc/rc.subr
  
--- 4,10 ----
  #
  
  # PROVIDE: dhclient
! # REQUIRE: network
  
  . /etc/rc.subr
  
Index: basesrc/etc/rc.d/mountcritremote
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/mountcritremote,v
retrieving revision 1.2
diff -c -r1.2 mountcritremote
*** mountcritremote	2000/05/13 08:45:07	1.2
--- mountcritremote	2000/06/12 22:55:07
***************
*** 4,10 ****
  #
  
  # PROVIDE: mountcritremote
! # REQUIRE: root mountcritlocal network
  
  . /etc/rc.subr
  
--- 4,10 ----
  #
  
  # PROVIDE: mountcritremote
! # REQUIRE: root mountcritlocal network dhclient
  
  . /etc/rc.subr
  
Index: basesrc/etc/rc.d/mountd
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/mountd,v
retrieving revision 1.6
diff -c -r1.6 mountd
*** mountd	2000/06/02 22:54:11	1.6
--- mountd	2000/06/12 22:55:07
***************
*** 4,10 ****
  #
  
  # PROVIDE: mountd
! # REQUIRE: mountall beforemountlkm network rpcbind quota
  
  . /etc/rc.subr
  
--- 4,10 ----
  #
  
  # PROVIDE: mountd
! # REQUIRE: mountall beforemountlkm network dhclient rpcbind quota
  
  . /etc/rc.subr
  
Index: basesrc/etc/rc.d/ntpdate
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/ntpdate,v
retrieving revision 1.3
diff -c -r1.3 ntpdate
*** ntpdate	2000/05/13 08:45:07	1.3
--- ntpdate	2000/06/12 22:55:07
***************
*** 4,10 ****
  #
  
  # PROVIDE: ntpdate
! # REQUIRE: syslogd network
  
  . /etc/rc.subr
  
--- 4,10 ----
  #
  
  # PROVIDE: ntpdate
! # REQUIRE: syslogd network dhclient
  
  . /etc/rc.subr
  
Index: basesrc/etc/rc.d/rpcbind
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/rpcbind,v
retrieving revision 1.3
diff -c -r1.3 rpcbind
*** rpcbind	2000/06/09 14:14:44	1.3
--- rpcbind	2000/06/12 22:55:07
***************
*** 4,10 ****
  #
  
  # PROVIDE: rpcbind
! # REQUIRE: network ntpdate syslogd named ppp
  
  . /etc/rc.subr
  
--- 4,10 ----
  #
  
  # PROVIDE: rpcbind
! # REQUIRE: network dhclient ntpdate syslogd named ppp
  
  . /etc/rc.subr
  
Index: basesrc/etc/rc.d/systemfs
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.d/systemfs,v
retrieving revision 1.2
diff -c -r1.2 systemfs
*** systemfs	2000/05/13 08:45:09	1.2
--- systemfs	2000/06/12 22:55:07
***************
*** 4,10 ****
  #
  
  # PROVIDE: systemfs
! # REQUIRE: network mountcritremote
  
  . /etc/rc.subr
  
--- 4,10 ----
  #
  
  # PROVIDE: systemfs
! # REQUIRE: network dhclient mountcritremote
  
  . /etc/rc.subr
  
>Release-Note:
>Audit-Trail:
>Unformatted: