NetBSD Problem Report #10349

Received: (qmail 19703 invoked from network); 12 Jun 2000 23:25:01 -0000
Message-Id: <200006122328.QAA06864@pawn.dhcp.eew.tgi.plexus.com>
Date: Mon, 12 Jun 2000 16:28:51 -0700 (PDT)
From: Scott Reynolds <scottr@plexus.com>
Reply-To: scottr@plexus.com
To: gnats-bugs@gnats.netbsd.org
Subject: dhclient doesn't start at an appropriate time with rc.d
X-Send-Pr-Version: 3.95

>Number:         10349
>Category:       misc
>Synopsis:       dhclient doesn't start at an appropriate time with rc.d
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    lukem
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 12 23:26:00 +0000 2000
>Closed-Date:    Thu Aug 10 15:35:17 +0000 2000
>Last-Modified:  Thu Aug 10 15:35:17 +0000 2000
>Originator:     Scott Reynolds
>Release:        NetBSD-current 2000-06-12
>Organization:
>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:

From: Frederick Bruckman <fb@enteract.com>
To: Scott Reynolds <scottr@plexus.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: misc/10349: dhclient doesn't start at an appropriate time with
 rc.d
Date: Mon, 12 Jun 2000 19:54:03 -0500 (CDT)

 Why ntpdate, but not ntpd? I put `# BEFORE: ntpd' in dhclient, so I
 can use the /etc/dhclient-*-hooks to get the names of the ntp servers
 (for my laptop).

 Is there any difference between using BEFORE: in the one, or REQUIRE:
 in the other? There doesn't seem to be, but it would be neat if there
 were, such that, for instance, you could do "/etc/rc.d/dhclient restart"
 and "ntpd" (and maybe others) would be restarted, too.


State-Changed-From-To: open->feedback 
State-Changed-By: lukem 
State-Changed-When: Thu Jul 20 16:46:05 PDT 2000 
State-Changed-Why:  
this is a duplicate of 10002 


Responsible-Changed-From-To: misc-bug-people->lukem 
Responsible-Changed-By: lukem 
Responsible-Changed-When: Thu Jul 20 16:46:05 PDT 2000 
Responsible-Changed-Why:  
i'm looking at it 
State-Changed-From-To: feedback->closed 
State-Changed-By: lukem 
State-Changed-When: Thu Aug 10 08:33:57 PDT 2000 
State-Changed-Why:  
this problem has now been resolved.  
the fix is in -current and the release branch 
>Unformatted:
 Scott Reynolds

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.