lualoader: Match Forth module-loading behavior w.r.t flags

Also as documented in loader.conf(5), ${module}_flags are actually flags to
be passed to the module, not to `load` as was done thus far.
This commit is contained in:
Kyle Evans 2018-06-12 18:42:41 +00:00
parent 6fdc57357e
commit 35beb9285b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335009

View File

@ -226,9 +226,6 @@ local function loadModule(mod, silent)
for k, v in pairs(mod) do
if v.load ~= nil and v.load:lower() == "yes" then
local str = "load "
if v.flags ~= nil then
str = str .. v.flags .. " "
end
if v.type ~= nil then
str = str .. "-t " .. v.type .. " "
end
@ -237,6 +234,9 @@ local function loadModule(mod, silent)
else
str = str .. k
end
if v.flags ~= nil then
str = str .. " " .. v.flags
end
if v.before ~= nil then
pstatus = cli_execute_unparsed(v.before) == 0
if not pstatus and not silent then