diff options
author | dcs <dcs@FreeBSD.org> | 2000-09-08 16:47:05 +0000 |
---|---|---|
committer | dcs <dcs@FreeBSD.org> | 2000-09-08 16:47:05 +0000 |
commit | 475f83c70ca2a39eacdb9dfe774681a8e8c2f305 (patch) | |
tree | 4bb815da23b865dd3501a646531853dae61d312e /sys/boot/common/module.c | |
parent | 9310f79758721695fb2fd0b07e7ea673b30f857b (diff) | |
download | FreeBSD-src-475f83c70ca2a39eacdb9dfe774681a8e8c2f305.zip FreeBSD-src-475f83c70ca2a39eacdb9dfe774681a8e8c2f305.tar.gz |
Fix autoboot. Now autoboot *always* show the correct kernel name. It
gets the name from the environment variable kernelname, which is set
when a kernel is loaded. For this reason, autoboot will _first_ try
to load a kernel, and only proceed with the wait prompt after that
succeeds. If it fails, it will abort immediately.
While I understand some may think this behavior undesirable, I think
it is, overall, the best thing to do, even if we do not consider the
aesthetic issue. Notice that anyone using the default loader.rc
already has the kernel loaded before autoboot.
On unload, unset kernelname.
Separate the code that tries to load a kernel from the list of options
to the function loadakernel(). It is used by both boot() and
autoboot().
Diffstat (limited to 'sys/boot/common/module.c')
-rw-r--r-- | sys/boot/common/module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c index 192e58d..4f4be9c 100644 --- a/sys/boot/common/module.c +++ b/sys/boot/common/module.c @@ -129,6 +129,7 @@ command_unload(int argc, char *argv[]) file_discard(fp); } loadaddr = 0; + unsetenv("kernelname"); return(CMD_OK); } |