Commit graph

13 commits

Author SHA1 Message Date
Gerd v. Egidy c2060e8a73 implement handling of serial consoles for autoterminal
serial consoles have separate systemd services (serial-getty@.service). We need to adapt
the handling and also need some different options for them than for regular gettys.

To allow sysrescue-initialize.py to differentiate between regular consoles and serial ones
they must be configured with the prefix "serial:" in the yaml, for example like this:

autoterminal:
    "serial:ttyS0": "/usr/bin/bash"
2022-05-12 22:53:57 +02:00
Gerd v. Egidy c3b0b576a4 Implement main part of autoterminal feature
See #258
2022-05-12 22:51:48 +02:00
Francois Dupoux cfcfd6dd7a Merge branch 'lua-config-once' into 'main'
execute sysrescue-configuration.lua only once

See merge request systemrescue/systemrescue-sources!193
2022-05-09 11:26:49 +00:00
Gerd v. Egidy e87660beeb execute sysrescue-configuration.lua only once
Before this patch sysrescue-configuration.lua was executed twice each boot:
(1) during initramfs stage (2) in the regular system as sysrescue-configuration.service

While in theory both runs should create the same output, this isn't guaranteed and
differences could appear for example because of network issues. Finding and debugging
these is difficult because the output of sysrescue-configuration.lua created during
initramfs isn't available anymore when the final system is running.

This patch lets sysrescue-configuration.lua just run once during initramfs. The
output JSON file is then written to the new tmpfs mounted dir /run/archiso/config/.
This dir is also made the new default location for sysrescue-effective-config.json.

A symlink from /etc/sysrescue/sysrescue-effective-config.json to the new location
is created for compatibility with previous releases.
2022-04-25 20:31:18 +02:00
Gerd v. Egidy 8cb9d2de6b harden sysrescue-autorun sysrescue-initialize.py against missing config values
Until now sysrescue-configuration.lua always ensured the default values were
in the effective JSON config because there was no way to remove them. Now the
lua script is improved to allow full config merging, including a delete function.
This could lead to the user accidently removing a value. The scripts did not
expect this and accessed non existing keys, leading to an exception.

This is fixed with this commit.
2022-04-24 01:08:27 +02:00
Gerd v. Egidy a100257d96 Add script and config.yaml parameter for late-loading of SystemRescueModules 2022-03-27 14:07:38 +00:00
Francois Dupoux 35bd8314f3 Use generic logic for overriding config entries from values in yaml config files (#251) 2022-01-28 20:34:23 +00:00
Francois Dupoux ca6bcd6548 Implement the primary configuration processing script in lua (#251) 2022-01-26 20:07:53 +00:00
Gerd v. Egidy 0a9b3250cf Support for adding Certification Authorities (CAs) via YAML config
This allows to add additional CAs as trust anchors via the root key
"ca-trust" in the YAML config files.

Why is this helpful and can't be done for example with SRMs?

After the CA files are copied, "update-ca-trust" must be called. This
updates *all* ca trust files. This means your SRM will override all
trust files with the ones used when creating the SRM.

When you then use the SRM with a newer version of SystemRescue, you will
still use the old ca trust files from when the SRM was built.
2022-01-16 19:03:51 +01: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
Francois Dupoux c91a4bf8f4 Make the search for config files with a yaml extension case insensitive 2022-01-02 15:49:24 +00:00
Francois Dupoux 7c5ce8cfdf Initial support for defining the global configuration with yaml file (#170) 2022-01-01 11:23:52 +00:00
fdupoux 0b3f0ce80e Convert sysrescue-initialize to python (#170) 2021-12-30 19:54:33 +00:00