History log of /freebsd-12.1/stand/lua/config.lua (Results 1 – 25 of 76)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0
# 94411fc3 04-Apr-2019 Kyle Evans <[email protected]>

MFC r344243, r345517-r345518: lualoader: More intelligent screen clearing

r344243:
lualoader: only clear the screen before first password prompt

This was previously an unconditional screen clear, r

MFC r344243, r345517-r345518: lualoader: More intelligent screen clearing

r344243:
lualoader: only clear the screen before first password prompt

This was previously an unconditional screen clear, regardless of whether or
not we would be prompting for any passwords. This is pointless, given that
the screen clear is only there to put our screen into a consistent state
before we draw the prompts and do cursor manipulation.

This is also the only screen clear besides that to draw the menu. One can
now see early pre-loader and loader output with the menu disabled, which may
be useful for diagnostics.

r345517:
lualoader: Clear the screen before prompting for password

Assuming that the autoboot sequence was interrupted, we've done enough
cursor manipulation that the prompt for the password will be sufficiently
obscured a couple of lines up. Clear the screen and reset the cursor
position here, too.

r345518:
lualoader: Fix up some luacheck concerns

- Garbage collect an unused (removed because it was useless) constant
- Don't bother with vararg notation if args will not be used

show more ...


Revision tags: release/12.0.0
# fdc0a80d 31-Oct-2018 Kyle Evans <[email protected]>

MFC r339677-r339678, r339702, r339805: Lualoader Bugfixes

r339677:
lualoader: unload upon kernel change if a kernel was previously loaded

In the majority of cases, a kernel is not loaded before we

MFC r339677-r339678, r339702, r339805: Lualoader Bugfixes

r339677:
lualoader: unload upon kernel change if a kernel was previously loaded

In the majority of cases, a kernel is not loaded before we hit the menu.
However, if a password is set, we'll trigger autoboot and have loadelf'd
beforehand. We also need to take into account one dropping to the loader
prompt and twiddling with things manually; if they try to toggle through
kernels, we'll assume they mean it.

r339678:
menu.lua: Abort autoboot sequence on failed command

Currently, a timeout in the menu autoboot sequence would effectively do
nothing. We would return from the autoboot handling, then begin processing
the menu without redrawing it.

This change makes the behavior a little more friendly. Returning the user to
the menu can't have any good effects, so abort the autoboot sequence and
drop to the loader prompt.

r339702:
lualoader: Improve module loading diagnostics

Some fixes:

- Maintain historical behavior more accurately w.r.t verbose_loading;
verbose_loading strictly prints "${module_name...}" and later "failed!"
or "ok" based on load success
- With or without verbose_loading, dump command_errbuf on load failure.
This usually happens prior to ok/failed if we're verbose_loading

r339805:
lualoader: Always return a proper dictionary for blacklist

If module_blacklist isn't specified, we have an empty blacklist; effectively
the same as if module_blacklist="" were specified in loader.conf(5).

This was reported when switching to a BE that predated the module_blacklist
introduction, but the problem is valid all the same and likely to be tripped
over in other scenarios.

Approved by: re (kib)

show more ...


# 532dc172 07-Oct-2018 Kyle Evans <[email protected]>

lualoader: Create a module blacklist, add DRM modules to it

This is a step in the process of easing migration into the new world order
of DRM drivers. Strongly encourage users towards loading DRM mo

lualoader: Create a module blacklist, add DRM modules to it

This is a step in the process of easing migration into the new world order
of DRM drivers. Strongly encourage users towards loading DRM modules via
rc.conf(5) instead of loader.conf(5) by failing the load from loader(8).
Users so inclined may wipe out the blacklist via module_blacklist="" in
loader.conf(5), and it is expected that these modules will eventually be
removed from the blacklist. They may still be loaded as dependencies of
other modules or explicitly via the loader prompt, but this should not be a
major problem.

Approved by: re (rgrimes)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D16914

show more ...


# 5dd1b834 25-Aug-2018 Kyle Evans <[email protected]>

lualoader: Fix override of module_path on loader prompt

Earlier changes setup a config.module_path variable that was populated upon
reading of loader.conf(5) and used for restoring module_path to pr

lualoader: Fix override of module_path on loader prompt

Earlier changes setup a config.module_path variable that was populated upon
reading of loader.conf(5) and used for restoring module_path to pristine
condition if multiple kernels are attempted. This broke the ability to
override module_path at the loader prompt in case of emergency.

Approved by: re (rgrimes)

show more ...


# 1ee89ab5 23-Aug-2018 Kyle Evans <[email protected]>

lualoader: Accept that people use unquoted values in loader.conf

While loader.conf(5) suggests that all values should be quoted, reality is
that this was never strictly enforced and it is used. We a

lualoader: Accept that people use unquoted values in loader.conf

While loader.conf(5) suggests that all values should be quoted, reality is
that this was never strictly enforced and it is used. We already make some
concession to this in number values, which aren't strictly quoted either.

The compromise here is that multi-word values must be quoted. This lets
things like `foo_load=YES` work, while denying more complex expressions on
the right hand side. This likely catches the vast majority of current usage.

A bit of a kludge is needed to accomplish this since Lua regex doesn't
support branching. I had considered splitting up expressions and generating
the right-hand side of the expressions completely in config.parse, but
deemed this too large of an overhaul to take given the current timing. This
should be re-worked shortly after the thaw.

Reported by: royger

show more ...


# 0d7bee6a 23-Aug-2018 Kyle Evans <[email protected]>

lualoader: Fix (add) Xen support

lualoader was not respecting the 'xen_kernel' environment variable, which
hints to the interpreter that it should load a Xen kernel prior to loading
any other kernel

lualoader: Fix (add) Xen support

lualoader was not respecting the 'xen_kernel' environment variable, which
hints to the interpreter that it should load a Xen kernel prior to loading
any other kernel that might be specified. If a Xen kernel is specified and
we fail to load it, we should not proceed to boot.

Reported by: royger
Tested by: royger

show more ...


# 9a16e110 22-Aug-2018 Kyle Evans <[email protected]>

lualoader: Fix loader.conf(5) EOL validation for 'exec' lines

This includes some light rework to simplify the line parsing, as well. If
we hit a line match, we'll always either use the line and mov

lualoader: Fix loader.conf(5) EOL validation for 'exec' lines

This includes some light rework to simplify the line parsing, as well. If
we hit a line match, we'll always either use the line and move on to the
next line, or we'll spew out malformed line errors.

We had multiple spots to output the error and set the status based on
whether we had a non-nil first capture group or failed EOL validation, but
it was always the same error. Light rework entails a small label jump to
skip error handling and elimination of 'found' local.

show more ...


# 058c692e 21-Aug-2018 Kyle Evans <[email protected]>

lualoader: Refactor config line expressions

A couple of issues addressed:

1.) Modules with - in the name were not recognized as modules
2.) The module regex was repeated for each place a module nam

lualoader: Refactor config line expressions

A couple of issues addressed:

1.) Modules with - in the name were not recognized as modules
2.) The module regex was repeated for each place a module name may appear
3.) The 'strip leading space' bits were repeated for each expression
4.) The trailing 'comment validation' stuff was repeated every expression

#4 still has some more work to be done. exec lines, for instance, don't
capture a 'value' -- there's only one capture pattern. This throws off the
'c' value that we match, so the trailing bits aren't *actually* being
validated. This isn't a new issue, though, so a future comit will address
this.

show more ...


# 90486977 13-Aug-2018 Kyle Evans <[email protected]>

lualoader: Fix parsing of negative number loader.conf(5) variables

They would previously cause errors, as the regex for these did not tolerate
a leading negative sign, and the variable would simply

lualoader: Fix parsing of negative number loader.conf(5) variables

They would previously cause errors, as the regex for these did not tolerate
a leading negative sign, and the variable would simply not parse.

show more ...


# be2050da 27-Jul-2018 Kyle Evans <[email protected]>

lualoader: "nextboot_file" should be spelled "nextboot_conf"

See: /boot/defaults/loader.conf

Reported by: gtetlow (inadvertently)


Revision tags: release/11.2.0
# 80eb81f6 19-Jun-2018 Kyle Evans <[email protected]>

lualoader: Correct kernel_options handling

`kernel_options` were being passed as flags to load, rather than to the
kernel being loaded. This is the kernel_options counterpart to r335009.


# 35beb928 12-Jun-2018 Kyle Evans <[email protected]>

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.


# deb8c8f5 10-Jun-2018 Kyle Evans <[email protected]>

lualoader: Support variable substitution in env var settings

We support both of the following cases of substitution:

bar="y"
foo="${bar}"
foo="$bar"

The latter substitution syntax is, of course, n

lualoader: Support variable substitution in env var settings

We support both of the following cases of substitution:

bar="y"
foo="${bar}"
foo="$bar"

The latter substitution syntax is, of course, not recommended- all
punctuation must be considered potential variable names, and we do not go
through the effort of searching the different combinations of, for instance,
"$x.y.z" to determine if the variable is $x, $x.y, or $x.y.z.

This is not officially documented as supported, but it has worked in
forthloader for what is most likely a long time as `evaluate` is used to
process the right hand side of the assignment.

show more ...


# 4072dcb3 10-Jun-2018 Kyle Evans <[email protected]>

lualoader: Process loader_conf_files properly

loader.conf(5) documents loader_conf_files to mean "additional configuration
files to be processed right after the present file." However, lualoader
ign

lualoader: Process loader_conf_files properly

loader.conf(5) documents loader_conf_files to mean "additional configuration
files to be processed right after the present file." However, lualoader
ignored loader_conf_files after processing /boot/defaults/loader.conf.

Rewrite these bits to process loader_conf_files after each loaded file.

show more ...


# 7aba5b2f 06-Jun-2018 Kyle Evans <[email protected]>

lualoader: Add a loaded hook for others to execute upon config load

This will not be executed on reload, though later work could allow for that.
It's intended/expected that later work won't generall

lualoader: Add a loaded hook for others to execute upon config load

This will not be executed on reload, though later work could allow for that.
It's intended/expected that later work won't generally need to happen on
every config load, just once (for, e.g., menu initialization) or just when
config is reloaded but not upon the initial load.

show more ...


# 8d21763e 01-Apr-2018 Kyle Evans <[email protected]>

lualoader: Simplify some expressions

- No need for a 'goto' when our entire loop body is then wrapped in a
conditional.

- No need to leave commented out prints laying around

- If an expression i

lualoader: Simplify some expressions

- No need for a 'goto' when our entire loop body is then wrapped in a
conditional.

- No need to leave commented out prints laying around

- If an expression is clearly going to be either nil or an expression that
isn't likely to be a boolean, we might as well use `or` to specify a
default value for the expression. e.g. `loader.getenv(...) or "no"`

show more ...


# 9994e26f 31-Mar-2018 Kyle Evans <[email protected]>

lualoader: revert whitespace change that snuck in


# 509b21c3 31-Mar-2018 Kyle Evans <[email protected]>

lualoader: Don't assume that {module}_load is set

The previous iteration of this assumed that {module}_load was set. In the
old world order of default loader.conf(5), this was probably a safe
assump

lualoader: Don't assume that {module}_load is set

The previous iteration of this assumed that {module}_load was set. In the
old world order of default loader.conf(5), this was probably a safe
assumption given that we had almost every module explicitly not-loaded in
it.

In the new world order, this is no longer the case, so one could delete a
_load line inadvertently while leaving a _name, _type, _flags, _before,
_after, or _error. This would have caused a confusing Lua error and borked
module loading.

show more ...


# 9c2d9b9e 31-Mar-2018 Kyle Evans <[email protected]>

lualoader: Do case-insensitive comparison of "yes"


# dbef5253 24-Mar-2018 Kyle Evans <[email protected]>

lualoader: Privatize some more config.lua bits

These functions are also not quite suitable for a public API, so privatize
them to config.


# 64c91742 24-Mar-2018 Kyle Evans <[email protected]>

lualoader: Make config env-related bits private API

This pertains exclusively to the set/restore functionality that we offer,
where any changes made by loader.conf previously will be effectively rem

lualoader: Make config env-related bits private API

This pertains exclusively to the set/restore functionality that we offer,
where any changes made by loader.conf previously will be effectively removed
upon reload of the configuration. We don't currently have a need to export
these, so don't bother.

show more ...


# aea262bf 21-Mar-2018 Kyle Evans <[email protected]>

lualoader: Add primitive hook module, use it to untangle bogus reference

See: comments in the hook module about intended usage, as well as the
introduced use for config.reloaded.

Use the newly intr

lualoader: Add primitive hook module, use it to untangle bogus reference

See: comments in the hook module about intended usage, as well as the
introduced use for config.reloaded.

Use the newly introduced hook module to define a "config.reloaded" hook.
This is currently used to register core's clearKernelCache as a reload hook
to avoid a circular dependency and fix this functionality- it didn't
actually work out, and it isn't immediately obvious how it slipped into src.

Other hook types will be introduced into the core lualoader as useful hook
points are identified.

show more ...


# f0b03262 13-Mar-2018 Kyle Evans <[email protected]>

lualoader: Sprinkle some verbose_loading salt

Our module loading messages should be hidden without verbose_loading -- go
ahead and do that as a first step.


# 35b0c718 09-Mar-2018 Kyle Evans <[email protected]>

lualoader: Cache kernel list

With autodetection turned on, hitting the filesystem everytime we need to
calculate choices for the kernel carousel is kind of slow. Cache once on the
first listing and

lualoader: Cache kernel list

With autodetection turned on, hitting the filesystem everytime we need to
calculate choices for the kernel carousel is kind of slow. Cache once on the
first listing and reload it anytime the config is reloaded in case any of
the loader.conf(5) changes that affect this (kernel, kernels,
kernels_autodetect) have changed. This also picks up the case where we've
changed currdev and the autodetected kernels could change.

show more ...


# 9ab2d3c5 07-Mar-2018 Kyle Evans <[email protected]>

lualoader: Use cli_execute_unparsed for commands passed in via loader.conf

This applies to:
- exec
- [module]_before
- [module]_error
- [module]_after

Before this commit, these used loader.perform

lualoader: Use cli_execute_unparsed for commands passed in via loader.conf

This applies to:
- exec
- [module]_before
- [module]_error
- [module]_after

Before this commit, these used loader.perform to execute them as a pure,
unsalted loader command. This means that they were not able to take
advantage of any Lua-salted loader commands, like boot and autoboot, or pure
Lua loader commands (functions attached to the 'cli' module).

They now have access to the full arsenal, just shy of being able to execute
arbitrary Lua.

show more ...


1234