mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 09:13:37 +01:00
lualoader: Only loadelf before boot/autoboot if no kernel loaded
Back when I "fixed" the loading of kernel/modules to be deferred until booting, I inadvertently broke the ability to manually load a set of kernels and modules in case of something bad having happened. lualoader would instead happily load whatever is specified in loader.conf(5) and go about the boot, leading to a panic loop as you try to rediscover a way to stop the panicky efirt module from loading and fail miserably. Reported by: me, sadly
This commit is contained in:
parent
ee4d316fe7
commit
a2a7830eb1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330564
@ -240,12 +240,18 @@ function core.setDefaults()
|
||||
end
|
||||
|
||||
function core.autoboot(argstr)
|
||||
config.loadelf()
|
||||
-- loadelf() only if we've not already loaded a kernel
|
||||
if loader.getenv("kernelname") == nil then
|
||||
config.loadelf()
|
||||
end
|
||||
loader.perform(composeLoaderCmd("autoboot", argstr))
|
||||
end
|
||||
|
||||
function core.boot(argstr)
|
||||
config.loadelf()
|
||||
-- loadelf() only if we've not already loaded a kernel
|
||||
if loader.getenv("kernelname") == nil then
|
||||
config.loadelf()
|
||||
end
|
||||
loader.perform(composeLoaderCmd("boot", argstr))
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user