Automatically select the appropriate kernel set based on the
kernel used to do the installation.
This commit is contained in:
parent
332b66d974
commit
9f0a09b27b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: md.c,v 1.22 2002/06/29 17:00:18 scottr Exp $ */
|
||||
/* $NetBSD: md.c,v 1.23 2002/07/18 05:35:00 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -927,7 +927,6 @@ md_debug_dump(title)
|
||||
int
|
||||
md_post_newfs(void)
|
||||
{
|
||||
md_select_kernel();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1107,41 +1106,35 @@ md_cleanup_install(void)
|
||||
run_prog(0, NULL, "rm -f %s", target_expand("/.profile"));
|
||||
}
|
||||
|
||||
void
|
||||
md_select_kernel()
|
||||
{
|
||||
struct utsname instsys;
|
||||
|
||||
/*
|
||||
* Get the name of the Install Kernel we are running under.
|
||||
*
|
||||
* Note: In md.h the two kernels are disabled. If they are
|
||||
* enabled there the logic here needs to be switched.
|
||||
*/
|
||||
uname(&instsys);
|
||||
if (strstr(instsys.version, "(INSTALLSBC)"))
|
||||
/*
|
||||
* Running the SBC Installation Kernel, so enable GENERICSBC
|
||||
*/
|
||||
toggle_getit (1);
|
||||
else
|
||||
/*
|
||||
* Running the GENERIC Installation Kernel, so enable GENERIC
|
||||
*/
|
||||
toggle_getit (0);
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
md_pre_update()
|
||||
{
|
||||
md_select_kernel();
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
md_init()
|
||||
{
|
||||
struct utsname instsys;
|
||||
|
||||
/*
|
||||
* Get the name of the Install Kernel we are running under and
|
||||
* enable the installation of the corresponding GENERIC kernel.
|
||||
*
|
||||
* Note: In md.h the two kernels are disabled. If they are
|
||||
* enabled there the logic here needs to be switched.
|
||||
*/
|
||||
uname(&instsys);
|
||||
if (strstr(instsys.version, "(INSTALLSBC)"))
|
||||
/*
|
||||
* Running the SBC Installation Kernel, so enable GENERICSBC
|
||||
*/
|
||||
toggle_getit(1);
|
||||
else
|
||||
/*
|
||||
* Running the GENERIC Installation Kernel, so enable GENERIC
|
||||
*/
|
||||
toggle_getit(0);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user