From crossd@cs.rpi.edu  Sun May 21 12:33:16 2000
Return-Path: <crossd@cs.rpi.edu>
Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16])
	by hub.freebsd.org (Postfix) with ESMTP id 2621337B5C9
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 May 2000 12:33:16 -0700 (PDT)
	(envelope-from crossd@cs.rpi.edu)
Received: from monica.cs.rpi.edu (monica.cs.rpi.edu [128.213.7.2])
	by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id PAA98690
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 May 2000 15:33:14 -0400 (EDT)
Received: (from crossd@localhost)
	by monica.cs.rpi.edu (8.9.3/8.9.2) id PAA67000;
	Sun, 21 May 2000 15:33:14 -0400 (EDT)
Message-Id: <200005211933.PAA67000@monica.cs.rpi.edu>
Date: Sun, 21 May 2000 15:33:14 -0400 (EDT)
From: "David E. Cross" <crossd@cs.rpi.edu>
Reply-To: crossd@cs.rpi.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: modifications to rc.network and rc.conf
X-Send-Pr-Version: 3.2

>Number:         18715
>Category:       conf
>Synopsis:       Changes to /etc/defaults/rc.conf, /etc/rc.network
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 21 12:40:01 PDT 2000
>Closed-Date:    Sat Jul 30 01:11:43 GMT 2005
>Last-Modified:  Sat Jul 30 01:11:43 GMT 2005
>Originator:     David E. Cross
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
Department of Computer Science Laboratory, Rensselaer
>Environment:
Heterogenious environment of FreeBSD, Solaris, IRIX, OpenBSD.  FreeBSD acting
as workstations and network servers.
	

>Description:
race condition in rc.network between starting amd and probing the shared
library path with ldconfig -m.  No clean place to start bootparamd.

	

>How-To-Repeat:

	

>Fix:
	
	
*** rc.network.orig	Sun May 21 11:39:44 2000
--- rc.network	Sun May 21 14:55:31 2000
***************
*** 367,372 ****
--- 367,379 ----
  		echo -n ' rarpd';	rarpd ${rarpd_flags}
  		;;
  	esac
+ 
+ 	case ${bootparamd_enable} in
+ 	[Yy][Ee][Ss])
+ 		echo -n ' bootparamd';	bootparamd ${bootparamd_flags}
+ 		;;
+ 	esac
+ 
  	echo '.'
  
  	# Let future generations know we made it.
***************
*** 551,556 ****
--- 558,566 ----
  	case ${amd_enable} in
  	[Yy][Ee][Ss])
  		echo -n ' amd'
+ 		if [ x"${amd_nicelevel}" != "xNO" ]; then
+ 			AMD_NICE="nice -${amd_nicelevel}"
+ 		fi
  		case ${amd_map_program} in
  		[Nn][Oo] | '')
  			;;
***************
*** 560,568 ****
  		esac
  
  		if [ -n "${amd_flags}" ]; then
! 			amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
  		else
! 			amd 2> /dev/null
  		fi
  		;;
  	esac
--- 570,588 ----
  		esac
  
  		if [ -n "${amd_flags}" ]; then
! 			${AMD_NICE} amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null
  		else
! 			${AMD_NICE} amd 2> /dev/null
! 		fi
! 		if [ x"${amd_waittimeout}" != "xNO" ]; then
! 			while [ ${amd_waittimeout} -gt 0 ]; do
! 				amd_waittimeout=`exp ${amd_waittimeout} - 1`
! 				sleep 1
! 				amq -h >/dev/null 2>/dev/null
! 				if [ $? = 0 ]; then
! 					amd_waittimeout=0;
! 				fi
! 			done
  		fi
  		;;
  	esac
*** defaults/rc.conf.orig	Sun May 21 11:39:59 2000
--- defaults/rc.conf	Sun May 21 11:42:23 2000
***************
*** 101,106 ****
--- 101,108 ----
  amd_enable="NO"			# Run amd service with $amd_flags (or NO).
  amd_flags="-a /.amd_mnt -c 1800 -l syslog /host /etc/amd.map /net /etc/amd.map"
  amd_map_program="NO"		# Can be set to "ypcat -k amd.master"
+ amd_nicelevel="NO"		# Nice level to run amd at (or NO).
+ amd_waittimeout="NO"		# How long to wait for amd (or NO).
  nfs_client_enable="NO"		# This host is an NFS client (or NO).
  nfs_client_flags="-n 4"		# Flags to nfsiod (if enabled).
  nfs_access_cache="2"		# Client cache timeout in seconds
***************
*** 120,125 ****
--- 122,129 ----
  keyserv_flags=""		# Flags to keyserv (if enabled).
  rarpd_enable="NO"		# Run rarpd (or NO).
  rarpd_flags=""			# Flags to rarpd.
+ bootparamd_enable="NO"		# Run bootparamd (or NO).
+ bootparamd_flags=""		# Flags to bootparamd.
  xtend_enable="NO"		# Run the X-10 power controller daemon.
  xtend_flags=""			# Flags to xtend (if enabled).
  pppoed_enable="NO"		# Run the PPP over Ethernet daemon.

>Release-Note:
>Audit-Trail:

From: Doug Barton <DougB@gorean.org>
To: crossd@cs.rpi.edu
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/18715: modifications to rc.network and rc.conf
Date: Sun, 21 May 2000 22:34:00 -0700

 "David E. Cross" wrote:
 
 > >Description:
 > race condition in rc.network between starting amd and probing the shared
 > library path with ldconfig -m.  No clean place to start bootparamd.
 
 >         case ${amd_enable} in
 >         [Yy][Ee][Ss])
 >                 echo -n ' amd'
 > +               if [ x"${amd_nicelevel}" != "xNO" ]; then
 > +                       AMD_NICE="nice -${amd_nicelevel}"
 > +               fi
 >                 case ${amd_map_program} in
 >                 [Nn][Oo] | '')
 >                         ;;
 
 	I can't comment on the usefulness of your addition, but having
 painstakingly removed the code in the style you submitted I would really
 hate for any more to be added back. :) The example right below this
 patch for amd_map_program should be your guide. 
 
 Doug
 -- 
         "Live free or die"
 		- State motto of my ancestral homeland, New Hampshire
 
 	Do YOU Yahoo!?
 
Responsible-Changed-From-To: freebsd-bugs->dce 
Responsible-Changed-By: asmodai 
Responsible-Changed-When: Sun Jun 11 07:09:09 PDT 2000 
Responsible-Changed-Why:  
Originator is a committer nowadays. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18715 
Responsible-Changed-From-To: dce->dec 
Responsible-Changed-By: asmodai 
Responsible-Changed-When: Sun Jun 11 07:12:57 PDT 2000 
Responsible-Changed-Why:  
Of course, appropriate spelling of the committers login might help. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18715 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Thu Aug 26 03:09:05 GMT 2004 
State-Changed-Why:  
Is this still a problem with modern versions of FreeBSD? 


Responsible-Changed-From-To: dec->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Aug 26 03:09:05 GMT 2004 
Responsible-Changed-Why:  
With bugmeister hat on, reassign from inactive committer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18715 
State-Changed-From-To: feedback->closed 
State-Changed-By: kris 
State-Changed-When: Sat Jul 30 01:11:36 GMT 2005 
State-Changed-Why:  
Feedback timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18715 
>Unformatted:
