Allow the fallback hostname to be overriden using an environment variable
See https://bugzilla.redhat.com/show_bug.cgi?id=1893417 for the back story: the fallback hostname matters a lot in certain environments. Right now the only way to configure the fallback hostname is by recompiling systemd, which is obviously problematic in case when the fallback hostname shall differ between different editions of the same distro that share a single compiled rpm. By making this overridable through an envvar, we're providing an escape hatch without making this a top-level api. Later on a way to set this through os-release is added, but I think the approach with the variable is still useful. It it very convenient for testing, or to override settings only in a particular service, etc.
This commit is contained in:
@@ -55,6 +55,10 @@ All tools:
|
||||
* `$SYSTEMD_EFI_OPTIONS` — if set, used instead of the string in the
|
||||
SystemdOptions EFI variable. Analogous to `$SYSTEMD_PROC_CMDLINE`.
|
||||
|
||||
* `$SYSTEMD_DEFAULT_HOSTNAME` — override the compiled-in fallback hostname
|
||||
(relevant in particular for the system manager and `systemd-hostnamed`).
|
||||
Must be a valid hostname (either a single label or a FQDN).
|
||||
|
||||
* `$SYSTEMD_IN_INITRD=[auto|lenient|0|1]` — if set, specifies initrd detection
|
||||
method. Defaults to `auto`. Behavior is defined as follows:
|
||||
`auto`: Checks if `/etc/initrd-release` exists, and a temporary fs is mounted
|
||||
|
||||
Reference in New Issue
Block a user