diff options
| author | Kyle Evans <kevans@FreeBSD.org> | 2018-10-25 02:14:35 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2018-10-25 02:14:35 +0000 |
| commit | 3078173c8d9061c82986e845b089bf3905034c18 (patch) | |
| tree | cd5b8e5b9cc2b5c6a55a458f1b679e6b55cce9a8 /stand/lua | |
| parent | f98c671d073627099f6ac3bd2e79747c5b72caef (diff) | |
Notes
Diffstat (limited to 'stand/lua')
| -rw-r--r-- | stand/lua/config.lua | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/stand/lua/config.lua b/stand/lua/config.lua index 49d4cbea185c..8a739d361784 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -55,7 +55,6 @@ local MSG_XENKERNLOADING = "Loading Xen kernel..." local MSG_KERNLOADING = "Loading kernel..." local MSG_MODLOADING = "Loading configured modules..." local MSG_MODBLACKLIST = "Not loading blacklisted module '%s'" -local MSG_MODLOADFAIL = "Could not load one or more modules!" local MODULEEXPR = '([%w-_]+)' local QVALEXPR = "\"([%w%s%p]-)\"" @@ -292,6 +291,9 @@ local function loadModule(mod, silent) end goto continue end + if not silent then + loader.printc(module_name .. "...") + end local str = "load " if v.type ~= nil then str = str .. "-t " .. v.type .. " " @@ -309,23 +311,29 @@ local function loadModule(mod, silent) end if cli_execute_unparsed(str) ~= 0 then + -- XXX Temporary shim: don't break the boot if + -- loader hadn't been recompiled with this + -- function exposed. + if loader.command_error then + print(loader.command_error()) + end if not silent then - print(MSG_FAILEXMOD:format(str)) + print("failed!") end if v.error ~= nil then cli_execute_unparsed(v.error) end status = false - end - - if v.after ~= nil then + elseif v.after ~= nil then pstatus = cli_execute_unparsed(v.after) == 0 if not pstatus and not silent then print(MSG_FAILEXAF:format(v.after, k)) end + if not silent then + print("ok") + end status = status and pstatus end - end ::continue:: end @@ -622,20 +630,18 @@ function config.loadelf() print(MSG_XENKERNLOADING) if cli_execute_unparsed('load ' .. xen_kernel) ~= 0 then print(MSG_XENKERNFAIL:format(xen_kernel)) - return + return false end end print(MSG_KERNLOADING) loaded = config.loadKernel(kernel) if not loaded then - return + return false end print(MSG_MODLOADING) - if not loadModule(modules, not config.verbose) then - print(MSG_MODLOADFAIL) - end + return loadModule(modules, not config.verbose) end hook.registerType("config.loaded") |
