Subject: Re: @booted_kernel magic symlink?
To: None <tech-kern@netbsd.org>
From: Chapman Flack <nblists@anastigmatix.net>
List: tech-kern
Date: 04/26/2006 15:16:39
Garrett D'Amore wrote:
> If I had a little more time, I'd go ahead and try to fix the kernel
> grovelers myself.  I don't know how many of them are out there, but
> there aren't many.

You could get a rough idea with grep -rl getbootfile /usr/src/*bin

They should all be fixed, as getbootfile(3) IS precisely the kind
of band-aid fix I think you are most objecting to: it does nothing
to change a program's basic grovelling nature, and only pretends
to DTRT wrt getting the correct file name, which it is actually not
capable of doing in any of the special cases you (and I) have already
pointed out.  Its man page says it appeared in 1.6.2, and I hesitate
to think of the amount of effort that probably went into rototilling
the bin sources at that time to get them all using that non-solution.
Clearly, somebody wrote getbootfile, and went into the source of
every grovelling program and changed it to use getbootfile without
changing how it grovels, and if I had been involved at the time I
probably would have argued in agreement with you that there should be
a better way to spend the time.

The present proposal, though, is only about one simple, one-place,
non-rototilling change that would give admins an easy, set it and
forget it way to work around the present problems of grovelers in
all the special cases we have mentioned (except the one where there
the kernel has no fs visibility at all, which is naturally unfixable
for a groveler). The biggest problem I can see with it is that it
might deprive us all of one thing to argue over while the work on
actually degrovelling the grovellers can proceed as time permits.

-Chap