From adrian@lorax.ubergeeks.com  Thu Jun 29 20:48:35 2000
Return-Path: <adrian@lorax.ubergeeks.com>
Received: from lorax.ubergeeks.com (lorax.ubergeeks.com [209.145.74.241])
	by hub.freebsd.org (Postfix) with ESMTP id 3B6AD37B5D6
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Jun 2000 20:48:34 -0700 (PDT)
	(envelope-from adrian@lorax.ubergeeks.com)
Received: (from adrian@localhost)
	by lorax.ubergeeks.com (8.9.3/8.8.8) id XAA05206;
	Thu, 29 Jun 2000 23:48:16 -0400 (EDT)
	(envelope-from adrian)
Message-Id: <200006300348.XAA05206@lorax.ubergeeks.com>
Date: Thu, 29 Jun 2000 23:48:16 -0400 (EDT)
From: adrian@ubergeeks.com
Sender: adrian@lorax.ubergeeks.com
Reply-To: adrian@ubergeeks.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: pccard_ether does not honor dhcp_{program,flags} settings in rc.conf
X-Send-Pr-Version: 3.2

>Number:         19592
>Category:       bin
>Synopsis:       pccard_ether does not honor dhcp_{program,flags} from rc.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 29 20:50:01 PDT 2000
>Closed-Date:    Tue May 29 10:59:38 MDT 2001
>Last-Modified:  Tue May 29 11:01:51 MDT 2001
>Originator:     Adrian Filipi-Martin
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
Ubergeeks Consulting
>Environment:

	4-stable from 06/29/00.

>Description:

	If you set either of the dhcp_program or dhcp_flags variables to
	non-default values in /etc/rc.conf _AND_ use DHCP with a PCCARD device,
	your settings will not be used.

>How-To-Repeat:

	Set either dhcp_program or dhcp_flags in /etc/rc.conf, e.g. 
	dhcp_flags="-D", and then insert your pccard network device.  
	The changes will not be used.  In contrast the settings are 
	used in rc.network.

>Fix:

	Apply the included patch.  Note it also adds some unnecessary {}'s for
	the sake of stylistic consistency lower down in the script.

--- pccard_ether.orig	Thu Jun 29 19:00:37 2000
+++ pccard_ether	Thu Jun 29 23:31:34 2000
@@ -23,18 +23,18 @@
 [Nn][Oo] | '')
         ;;
 [Dd][Hh][Cc][Pp])
-	if [ -r /sbin/dhclient ]; then
+	if [ -r ${dhcp_program:=/sbin/dhclient} ]; then
 		if [ -s /var/run/dhclient.pid ]; then
 			kill `cat /var/run/dhclient.pid`
 			rm /var/run/dhclient.pid
 		fi
-		/sbin/dhclient $interface
+		${dhcp_program} ${dhcp_flags} ${interface}
 	elif [ -r /usr/local/sbin/dhcpc ]; then
 		if [ -s /var/run/dhcpc.pid ]; then
 			kill `cat /var/run/dhcpc.pid`
 			rm /var/run/dhcpc.pid
 		fi
-		/usr/local/sbin/dhcpc $interface $*
+		/usr/local/sbin/dhcpc ${interface} $*
 	else
 		echo "DHCP client software not available (isc-dhcp2)"
 	fi


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Fri Jun 30 00:23:50 PDT 2000 
Responsible-Changed-Why:  
Warner, this one comes with a patch. :-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19592 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Tue May 29 10:59:38 MDT 2001 
State-Changed-Why:  
This appaers to have already been corrected.  No sense having it open 
after the fact :-) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=19592 
>Unformatted:
