Commit graph

8 commits

Author SHA1 Message Date
Gerd v. Egidy 354b550524 support configuring the content of the bash_history in the YAML config
Allows to preconfigure common commands so that they can be accessed by just pressing
the up arrow key or searched with ctrl+r.

Move the "setkmap" command (which was previously hardcoded into .bash_history) into
100-defaults.yaml, allowing it to be overridden.

Example config:

sysconfig:
    bash_history:
        100: "setkmap"
        200: "reverse_ssh support.example.com 1234"

The Mapping / dict key is used for lexicographic reverse-ordering of the entries. Reverse-ordering
means the lowest key will show up first when pressing the up arrow key.
2022-12-11 19:26:14 +01:00
Gerd v. Egidy f4f582edb4 Implement new autorun configuration ( #287)
- Implement a new style configuring autorun scripts ("autorun.exec"), more suited to a YAML config file than the old style (#287)
- The old style autorun scripts are still fully supported, they are loaded into keys from "1000-autorun" to "1026-autorunF"
- change the default for ar_nowait to true
- add "shell" option for new autorun exec scripts: let bash interpret the command instead of directly forking it from python
- allow to wait for keypress with a countdown timer, all keys are accepted now (instead of just enter as in the past)
- fix is_elf_binary
- improve output and logging (#253)
- use curl instead of wget for downloading scripts from URLs
- bind-mount /run/archios/bootmnt in case of copytoram to create a stable path for the new-style scripts
- deprecate storing autorun scripts in the root of the boot disk (#252)
- don't check /var/autorun/cdrom for autorun scripts anymore, it was not documented and there are more than enough better alternatives
2022-10-11 19:29:13 +00:00
Gerd v. Egidy 24529bbb58 change yaml config loading logic to full merge
Previously when loading a YAML config, it overrode single values on the second hierarchy level.
But on all deeper levels new values were completely overwritten. This was inconsistent and poses
a problem for config entries that use these levels, like the ca-trust or the in-development autoterminal.

This change implements full merging of dictionaries on all levels to solve this. Values in files later
in precedence overwrite previous values. If the the old and the new config values are both dictionaries,
then the hierarchy levels are merged down recursively.

You can remove a previously existing dict entry again in a later file by assigning it an empty value.

Also fix handling of invalid YAMLs: ignore them instead of aborting execution
2022-04-23 23:18:23 +02:00
Francois Dupoux ca6bcd6548 Implement the primary configuration processing script in lua (#251) 2022-01-26 20:07:53 +00:00
fdupoux 5e1db4b5bf Move 100-defaults.yaml to the correct location 2022-01-09 17:31:08 +00:00
fdupoux 13723f10b0 Rename default yaml config files 2022-01-09 17:19:53 +00:00
Francois Dupoux a4d96bb424 Add support for yaml configuration files in autorun 2022-01-09 16:14:48 +00:00
Francois Dupoux e037cc089c Name the folder for configuration files "sysrescue.d" rather than "config.d" (#170) 2022-01-03 13:39:43 +00:00