History log of /freebsd/stand/lua/config.lua (Results 76 – 100 of 115)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# eed91cae 24-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Explain nextboot stuff a little bit more


# d930cdc2 24-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Add comment on trailing space, don't operate on nil

Functionally, the latter error wouldn't necessarily hurt anything. io.write
will just error out as it's not passed a valid file handle.

lualoader: Add comment on trailing space, don't operate on nil

Functionally, the latter error wouldn't necessarily hurt anything. io.write
will just error out as it's not passed a valid file handle. Still, we can do
better than that.

show more ...


# 483f0a33 24-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Correct test and name

The functionality was correct, but our style guidelines tend to request that
we shy away from using boolean operations in place of explicit comparisons
to nil.


# e83d7bf2 24-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Plug file handle not properly closed


# 3dcb7648 24-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Add nextboot support

config.parse now takes an extra callback that is invoked on the full text of
the config file. This callback dictates where we should actually try to
parse this file o

lualoader: Add nextboot support

config.parse now takes an extra callback that is invoked on the full text of
the config file. This callback dictates where we should actually try to
parse this file or not.

For nextboot, we use this to halt parsing if we see 'nextboot_enable="NO"'.
If we don't, parse it and write 'nextboot_enable="NO" ' to it. The same
caveat as with forth still applies- writing is only supported by UFS.

show more ...


# 9ed6f9ef 23-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Use "local function x()" instead of "local x = function()"

The latter is good, but the former is more elegant and clear about what 'x'
is. Adopt it, preferably only using the latter kind

lualoader: Use "local function x()" instead of "local x = function()"

The latter is good, but the former is more elegant and clear about what 'x'
is. Adopt it, preferably only using the latter kind of notation where needed
as values for tables.

show more ...


# 72e39d71 23-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

Add SPDX tags to lua files


# 66964bbc 22-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Attend to some 80-col issues, pointed out by luacheck

Graphics have a tendency to cause 80-col issues, so make an exception to our
standard indentation guidelines for these graphics. This

lualoader: Attend to some 80-col issues, pointed out by luacheck

Graphics have a tendency to cause 80-col issues, so make an exception to our
standard indentation guidelines for these graphics. This does not hamper
readability too badly.

Two 40-column strings of spaces is trivially replaced with
string.rep(" ", 80)

show more ...


# 3c6b387a 22-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Clear up an empty conditional branch

We will likely uncomment this whole monster in the near future.


# e2df27e3 22-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Address some 'luacheck' concerns

luacheck pointed out an assortment of issues, ranging from non-standard
globals being created as well as unused parameters, variables, and redundant
assig

lualoader: Address some 'luacheck' concerns

luacheck pointed out an assortment of issues, ranging from non-standard
globals being created as well as unused parameters, variables, and redundant
assignments.

Using '_' as a placeholder for values unused (whether it be parameters
unused or return values unused, assuming multiple return values) feels clean
and gets the point across, so I've adopted it. It also helps flag candidates
for cleanup later in some of the lambdas I've created, giving me an easy way
to re-evaluate later if we're still not using some of these features.

show more ...


# d66c7413 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Output "Failed to parse" messages

I can't find any good reason these aren't enabled, so enable them.

The silent runs will only return false on actual parse errors, so it's ok to
be loud

lualoader: Output "Failed to parse" messages

I can't find any good reason these aren't enabled, so enable them.

The silent runs will only return false on actual parse errors, so it's ok to
be loud about those failures.

show more ...


# 062d62c9 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Don't return false for failure to open config on silent parse


# 49550489 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Drop explicit boolean tests; b or not b


# 9f71d421 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Drop excessive parenthesizing

This was also a convenience convention (for me) that is not very lua-tic.
Drop it.

I've maintained some parentheses where I'd prefer them, for example,
'if

lualoader: Drop excessive parenthesizing

This was also a convenience convention (for me) that is not very lua-tic.
Drop it.

I've maintained some parentheses where I'd prefer them, for example,
'if x or y or (z and w) then', but these situations are far and few between.

show more ...


# aedd6be5 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Drop terminating semicolons

This was previously chosen out of convenience, as we had a mixed style and
needed to be consistent. I started learning Lua on Friday, so I switched
everything

lualoader: Drop terminating semicolons

This was previously chosen out of convenience, as we had a mixed style and
needed to be consistent. I started learning Lua on Friday, so I switched
everything over. It is not a very lua-nic convention, though, so drop it.

Excessive parenthesizing around conditionals is next on the chopping block.

show more ...


# e73c944f 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: When restoring environment, only restore unchanged vars

Track the latest value we've set an environment variable to, and only
restore those that are unchanged from that.

This gives us so

lualoader: When restoring environment, only restore unchanged vars

Track the latest value we've set an environment variable to, and only
restore those that are unchanged from that.

This gives us some leeway to make sure we're not clobbering variables
overwritten by menu changes.

show more ...


# df9e50a9 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Don't try so hard to load a kernel

If the user's selected a kernel, we really should be trying to load that one
instead of falling back to some default kernel.

This should generally be a

lualoader: Don't try so hard to load a kernel

If the user's selected a kernel, we really should be trying to load that one
instead of falling back to some default kernel.

This should generally be a no-op and most desirable, unless you really
enjoyed surprises.

show more ...


# ebddeb04 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Prefer selected kernel to currently loaded


# 25c4c7a5 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Move carousel storage out into config

Carousel storage doesn't need to happen in the menu module, and indeed
storing it there introduces a circular reference between drawer and menu
that

lualoader: Move carousel storage out into config

Carousel storage doesn't need to happen in the menu module, and indeed
storing it there introduces a circular reference between drawer and menu
that only works because of global pollution in loader.lua.

Carousel choices generally map to config entries anyways, making it as good
of place as any to store these. Move {get,set}CarouselIndex functionality
out into config so that drawer and menu may both use it. If we had more
carousel functionality, it might make sense to create a carousel module, but
this is not the case.

show more ...


# b5746545 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Consistently organize modules

We follow pretty closely the following structure of a module:

1. Copyright notice
2. Module requires
3. Module local declarations
4. Module local definition

stand/lua: Consistently organize modules

We follow pretty closely the following structure of a module:

1. Copyright notice
2. Module requires
3. Module local declarations
4. Module local definitions
5. Module exports
6. return

Re-organize the one-offs (config/drawer) and denote the start of module
exports with a comment.

show more ...


# 21d5bcbe 19-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Add copyright notice in places

I've made some not-insignificant changes to config, menu, and password bits
of our lua scripts. Add a copyright notice to them to reflect.


# 1f5696c7 19-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Round up some more style.lua(9) concerns


# e6db469b 19-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Remove inaccurate comment after r329590

lualoader does a pretty good job of reverting any environment changes now.
It will even wipe out boot_verbose if it's set explicitly in loader.conf

stand/lua: Remove inaccurate comment after r329590

lualoader does a pretty good job of reverting any environment changes now.
It will even wipe out boot_verbose if it's set explicitly in loader.conf(5)
and overwritten in the boot options menu.

Future work will likely change this, as explicit choices made in the menu
should probably override the new loader.conf(5). I don't suspect this will
cause much grief, though, so it is not a high priority until boot
environment support actually lands.

show more ...


# ce4a5da5 19-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Restore environment upon config reload

This restores environment to whatever defaults we had coming into lualoader.


# df8a9d46 19-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Track env changes that come in via loader.conf(5)

This will be used when boot environment support lands to make a good-faith
effort to apply any new loader.conf(5) environment settings at

stand/lua: Track env changes that come in via loader.conf(5)

This will be used when boot environment support lands to make a good-faith
effort to apply any new loader.conf(5) environment settings atop the default
configuration that we started with.

show more ...


12345