From owner-freebsd-current Wed Oct 10 23:12:45 2001 Delivered-To: freebsd-current@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 7B97237B408; Wed, 10 Oct 2001 23:12:39 -0700 (PDT) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f9B6CdM82852; Wed, 10 Oct 2001 23:12:39 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 219EB3809; Wed, 10 Oct 2001 23:12:39 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Mark Peek Cc: Warner Losh , cjclark@alum.mit.edu, bmah@FreeBSD.ORG, Ruslan Ermilov , Bruce Evans , Boris Popov , freebsd-current@FreeBSD.ORG Subject: Re: kldxref broken, maybe? In-Reply-To: Date: Wed, 10 Oct 2001 23:12:39 -0700 From: Peter Wemm Message-Id: <20011011061239.219EB3809@overcee.netplex.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mark Peek wrote: > At 4:04 PM -0700 10/10/01, Peter Wemm wrote: > >Warner Losh wrote: > >> In message <20011010144919.N387@blossom.cjclark.org> "Crist J. > >>Clark" writes: > >> : I think just running 'installworld' twice will "fix" it. The error is > >> : non-fatal, but not without implications. The only one that I am aware > >> : of is that your system might have some trouble doing kldload(8) unless > >> : it is given the full path of the module. > >> > >> Ummm, installworld N times won't fix things because the modules are > >> are installed as part of installkernel. > >> > >> This is a database that should be rebuilt at boot time too. > > > >Absolutely. Any takers for a /etc/rc patch to break apart sysctl > >kern.module_path by the ';' and do a ldconfig refresh at boot after the > >filesystems are mounted? In theory we just need the / filesystem > >read/write. > > Something like this? > > script_save_sep=$IFS > IFS=";" > for modpath in `sysctl -n kern.module_path`; do > if [ -d $modpath ]; then > kldxref $modpath > fi > done > IFS="$script_save_sep" > > I would have provided a patch to /etc/rc but I didn't know when you > would want it executed. The conservative option would be to have it after all local disks were mounted but before nfs was mounted. Ie: just before, or just after the section marked: # Run custom disk mounting function here Actually, just after I think. The other school of thought is to run it right after the root fs mount, but before "mount -a -t nonfs". This has the advantage that various filesystems (eg: msdosfs) will be found if the module file is in a strange location. But the disadvantage is that then you wouldn't be auto rebuilding (say) /usr/local/modules/linker.hints if /usr and/or /usr/local were on some other fs. An alternative may be something along the lines of: mount root script_save_sep=$IFS extramods="" IFS=";" for modpath in `sysctl -n kern.module_path`; do if [ -d $modpath ]; then kldxref $modpath else extramods="$extramods $modpath" fi done IFS="$script_save_sep" mount -a -t nonfs for modpath in $extramods; do if [ -d $modpath ]; then kldxref $modpath else extramods2="$extramods2 $modpath" fi done ... rest of stuff including nfs mounts... for modpath in $extramods2; do if [ -d $modpath ]; then kldxref $modpath fi done This is probably overkill, but should cover all the possibilities. (and could do with some cleanup) > Mark > > Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message