Subject: Re: @booted_kernel magic symlink?
To: Chapman Flack <nblists@anastigmatix.net>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 04/27/2006 14:13:46
Chapman Flack wrote:
> The one thing that prevents the existing sysctl from serving the
> same purpose is that it knows the basename of the booted kernel,
> but it does not (and in the general case cannot) know where that
> will ultimately be mounted to return a correct full path. (The
> sysctl probably *could* be made to search the mounts to find one
> that matches the booted partition, but I am not advocating that
> solution; more complex than it's worth and still unable to
> handle NFS or other non-local cases).
>
> The key observation is that although the sysctl doesn't and
> can't have this information, the admininstrator of the system
> certainly does. There will always some unavoidable step where
> the admin either says:
>
> ln -s /where-I-mount-it/@booted_kernel /netbsd
>
> or writes some rc.d script that always does
>
> ln -sf /where-I-mount-it/$(sysctl machdep.booted_kernel) /netbsd
>
> every boot.
From what I understand so far, it's only savecore that really cares
about the exact location of the kernel? All the rest of the programs
can use ksyms or sysctls or whatever instead, and don't need direct
access to the kernel file itself.
What about just putting something like:
savecore_flags="-N /where-I-mount-it/$(sysctl machdep.booted_kernel)"
in /etc/rc.conf or /etc/rc.conf.d/savecore?
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Support and Service: http://www.wasabisystems.com/