From nobody@FreeBSD.org  Thu Jun 16 08:59:15 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3406816A41C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 Jun 2005 08:59:15 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2137043D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 Jun 2005 08:59:15 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j5G8xEBt042996
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 Jun 2005 08:59:15 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j5G8xECA042993;
	Thu, 16 Jun 2005 08:59:14 GMT
	(envelope-from nobody)
Message-Id: <200506160859.j5G8xECA042993@www.freebsd.org>
Date: Thu, 16 Jun 2005 08:59:14 GMT
From: Darren Pilgrim <dmp@bitfreak.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /etc/pccard_ether does not make sure /etc/rc.conf has been sourced
X-Send-Pr-Version: www-2.3

>Number:         82313
>Category:       conf
>Synopsis:       [patch] /etc/pccard_ether does not make sure /etc/rc.conf has been sourced
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 16 09:00:33 GMT 2005
>Closed-Date:    Thu Jun 16 18:08:57 GMT 2005
>Last-Modified:  Thu Jun 16 18:08:57 GMT 2005
>Originator:     Darren Pilgrim
>Release:        6.0-CURRENT
>Organization:
n/a
>Environment:
FreeBSD Smiley.Blackthornes.LAN 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sat Jun 11 20:04:30 PDT 2005 root@Smiley.Blackthornes.LAN:/usr/obj/usr/src/sys/Smiley  i386

>Description:
/etc/pccard_ether requires variables set in /etc/rc.conf.  As it is possible and reasonable to run /etc/pccard_ether from the user command-line and other environments where /etc/rc.conf hasn't been sourced, pccard_ether should source /etc/rc.conf itself to avoid inappropriate failures.
>How-To-Repeat:
As a user, run /etc/pccard_ether.  It will fail silently if removable_interfaces isn't in the environment.  It will fail in other, possibly more interesting ways if removable_interfaces is defined but other required variables are not.
>Fix:
--- pccard_ether.orig   Thu Jun 16 00:27:12 2005
+++ pccard_ether        Thu Jun 16 01:30:04 2005
@@ -7,6 +7,7 @@
 # example: pccard_ether fxp0 start
 #

+. /etc/rc.conf
 . /etc/rc.subr
 . /etc/network.subr


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brooks 
State-Changed-When: Thu Jun 16 18:08:12 GMT 2005 
State-Changed-Why:  
I've committed a more correct fix.  Thanks for the report. 


Responsible-Changed-From-To: freebsd-bugs->brooks 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Thu Jun 16 18:08:12 GMT 2005 
Responsible-Changed-Why:  
I've committed a more correct fix.  Thanks for the report. 

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