Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2011 17:13:19 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pan Tsu <inyaoo@gmail.com>
Subject:   Re: svn commit: r223917 - head/etc/rc.d
Message-ID:  <4E1B919F.7000800@FreeBSD.org>
In-Reply-To: <201107111114.33159.jhb@freebsd.org>
References:  <201107102347.p6ANl3qK066321__21248.7196004533$1310341655$gmane$org@svn.freebsd.org> <86ipr9sl4j.fsf@gmail.com> <4E1A498B.9080506@FreeBSD.org> <201107111114.33159.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/11/2011 08:14, John Baldwin wrote:
> On Sunday, July 10, 2011 8:53:31 pm Doug Barton wrote:
>> On 07/10/2011 17:42, Pan Tsu wrote:
>>> Doug Barton <dougb@FreeBSD.org> writes:
>>>
>>> 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?
> 
> If you do 'boot foo' at the loader prompt you get 
> /boot/foo;/boot/kernel;/boot/modules.

No, I don't actually, which was my point to Pan:

sysctl kern.bootfile
kern.bootfile: /boot/kernel.patched/kernel

sysctl kern.module_path
kern.module_path: /boot/kernel;/boot/modules;/usr/local/modules

That was after hitting "2. Escape to the loader prompt" at the beastie
menu, and typing 'boot kernel.patched'. The fact that it did not work as
one might expect was the reason I wrote the code that I did.

> It is arguably broken that the old /boot/kernel is still in the list, but that 
> bug should be fixed in the loader, not here.

I think that given the fact that we seem to have multiple broken
versions (as in, my version is broken one way, yours seems to be broken
a different way), it's hard for me to imagine removing the "belt and
suspenders" that I've already added. Not to mention the need to support
RELENG[78].

> However, I've never had a 
> problem with kldload doing the wrong thing when using 'boot foo'.  Do you have 
> an actual use case that is broken?

I was initially hoping to avoid the gymnastics, but given that
module_path wasn't doing TRT I thought it safe to err on the side of
caution.

> Oh, and if you use 'nextboot -k foo' or set 'kernel=foo' in loader.conf then 
> it will DTRT.  However, I would expect this script to be equivalent to a for 
> loop of 'kldload foo', but now it isn't since you are using a divergent 
> algorithm.  That violates POLA IMO.

It's not clear to me how what I'm doing is different than what _should_
be happening. If you can spell that out to me I'd really appreciate it.


Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E1B919F.7000800>