lualoader: Add drawer-exported variables for default logodefs

Uncovered while writing the documentation from this, we previously
explicitly fell back to orb or orbbw if an invalid or incompatible logodef
was selected -- in contrast to branddefs, which have an exported variable
that one can whip up a quick local.lua to override in a safe manner that
works regardless of whether or not loader.conf(5) successfully loads.
This commit is contained in:
Kyle Evans 2018-08-19 18:43:10 +00:00
parent a9edc01b20
commit 2c690e2a40

View File

@ -247,9 +247,9 @@ local function drawlogo()
(not colored and logodef.requires_color) then
-- Choose a sensible default
if colored then
logodef = getLogodef("orb")
logodef = getLogodef(drawer.default_color_logodef)
else
logodef = getLogodef("orbbw")
logodef = getLogodef(drawer.default_bw_logodef)
end
end
@ -346,6 +346,8 @@ shift = default_shift
-- Module exports
drawer.default_brand = 'fbsd'
drawer.default_color_logodef = 'orb'
drawer.default_bw_logodef = 'orbbw'
function drawer.addBrand(name, def)
branddefs[name] = def