From nobody@FreeBSD.ORG Thu Nov 18 17:34:39 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id CC5AF15018; Thu, 18 Nov 1999 17:34:39 -0800 (PST)
Message-Id: <19991119013439.CC5AF15018@hub.freebsd.org>
Date: Thu, 18 Nov 1999 17:34:39 -0800 (PST)
From: nn@broadcom.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: kldload loads <file> from /modules even if <file> exists locally
X-Send-Pr-Version: www-1.0

>Number:         14988
>Category:       kern
>Synopsis:       kldload loads <file> from /modules even if <file> exists locally
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 18 17:40:01 PST 1999
>Closed-Date:    Sat Nov 20 11:32:28 PST 1999
>Last-Modified:  Sat Nov 20 11:33:40 PST 1999
>Originator:     neal nuckolls
>Release:        3.2
>Organization:
broadcom corporation
>Environment:
FreeBSD bofur 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Fri Aug 20 13:43:39 PDT 1999     gmo@thorin:/home1/bsd/src-3.2/sys/compile/EPICLNT  i386

>Description:
Very non-intuitively, "kldload file.ko" ignores the file "file.ko"
if it exists in the current directly and instead loads
file.ko from /modules if it exists there.

bofur# pwd
/home/nn/w/src/bcm42xx/freebsd
bofur# ls -l if_il.ko
-rwxr-xr-x  1 nn  epi  179942 Nov 18 17:24 if_il.ko
bofur# ls -l /modules/if_il*
ls: No match.
bofur# kldload if_il.ko
kldload: can't load if_il.ko: No such file or directory
bofur# kldload ./if_il.ko
bofur#

>How-To-Repeat:
see above
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dan 
Responsible-Changed-By: dan 
Responsible-Changed-When: Fri Nov 19 16:43:03 PST 1999 
Responsible-Changed-Why:  
I'll take this if no one minds... 

From: Peter Wemm <peter@netplex.com.au>
To: nn@broadcom.com
Cc: freebsd-gnats-submit@freebsd.org, freebsd-bugs@freebsd.org
Subject: Re: kern/14988: kldload loads <file> from /modules even if <file> exists locally 
Date: Sat, 20 Nov 1999 21:26:00 +0800

 nn@broadcom.com wrote:
 > >Number:         14988
 > >Category:       kern
 > >Synopsis:       kldload loads <file> from /modules even if <file> exists loc
 [..]
 > >Description:
 > Very non-intuitively, "kldload file.ko" ignores the file "file.ko"
 > if it exists in the current directly and instead loads
 > file.ko from /modules if it exists there.
 
 This is actually as designed...
 
 # sysctl kern.module_path
 kern.module_path: /;/boot/;/modules/
 
 If you want it to load from . you can set it to:  ./;/;/boot/;/modules/
 and that will work.  It's done that way for the same reason we don't have
 "." in the beginning of $PATH.
 
 Cheers,
 -Peter
 
 
 
State-Changed-From-To: open->closed 
State-Changed-By: dan 
State-Changed-When: Sat Nov 20 11:32:28 PST 1999 
State-Changed-Why:  
This is actually a "designed feature".  Please see sysctl variable 
kern.module_path 

Cheers to: peter 
>Unformatted:
