Date: Mon, 11 Jul 2011 05:38:11 +0400 From: Pan Tsu <inyaoo@gmail.com> To: Doug Barton <dougb@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r223917 - head/etc/rc.d Message-ID: <86vcv97g1o.fsf@gmail.com> In-Reply-To: <4E1A498B.9080506@FreeBSD.org> (Doug Barton's message of "Sun, 10 Jul 2011 17:53:31 -0700") References: <201107102347.p6ANl3qK066321__21248.7196004533$1310341655$gmane$org@svn.freebsd.org> <86ipr9sl4j.fsf@gmail.com> <4E1A498B.9080506@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Doug Barton <dougb@FreeBSD.org> writes: > On 07/10/2011 17:42, Pan Tsu wrote: >> Doug Barton <dougb@FreeBSD.org> writes: >> >>> Author: dougb >>> Date: Sun Jul 10 23:47:03 2011 >>> New Revision: 223917 >>> URL: http://svn.freebsd.org/changeset/base/223917 >>> >>> Log: >>> Make sure we load kernel modules from the same path as the running kernel >>> >>> Modified: >>> head/etc/rc.d/kld >>> >>> Modified: head/etc/rc.d/kld >>> ============================================================================== >>> --- head/etc/rc.d/kld Sun Jul 10 22:09:53 2011 (r223916) >>> +++ head/etc/rc.d/kld Sun Jul 10 23:47:03 2011 (r223917) >>> @@ -41,11 +41,24 @@ kld_start() >>> { >>> [ -n "$kld_list" ] || return >>> >>> - local _kld >>> + local _kernel_path _module_path _kld _path >>> + >>> + _kernel_path=`$SYSCTL_N kern.bootfile` >>> + _kernel_path="${_kernel_path%/*}" >>> + >>> + _module_path=`$SYSCTL_N kern.module_path` >>> + _module_path="${_module_path#*\;}" >>> + _module_path="$_kernel_path `ltr $_module_path \; ' '`" >> [...] >> >> Doesn't /boot/support.4th already populates kern.module_path with >> the path of successfully booted kernel? How is this different? > > When you test it, what happens? /boot/foo is replaced by /boot/foo. But ignore my noise, I didn't test with other loaders, loading manually and booting from boot2.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86vcv97g1o.fsf>