Files
systemd/docs
Valentin David 0dc39dffbd Use paths specified from environment variables for /etc configuration files
Some configuration files that need updates are directly under in /etc. To
update them atomically, we need write access to /etc. For Ubuntu Core this is
an issue as /etc is not writable. Only a selection of subdirectories can be
writable. The general solution is symlinks or bind mounts to writable places.
But for atomic writes in /etc, that does not work. So Ubuntu has had a patch
for that that did not age well.

Instead we would like to introduce some environment variables for alternate
paths.

 * SYSTEMD_ETC_HOSTNAME: /etc/hostname
 * SYSTEMD_ETC_MACHINE_INFO: /etc/machine-info
 * SYSTEMD_ETC_LOCALTIME: /etc/localtime
 * SYSTEMD_ETC_LOCALE_CONF: /etc/locale.conf
 * SYSTEMD_ETC_VCONSOLE_CONF: /etc/vconsole.conf
 * SYSTEMD_ETC_ADJTIME: /etc/adjtime

While it is for now expected that there is a symlink from the standard, we
still try to read them from that alternate path. This is important for
`/etc/localtime`, which is a symlink, so we cannot have an indirect symlink or
bind mount for it.

Since machine-id is typically written only once and not updated. This commit
does not cover it. An initrd can properly create it and bind mount it.
2025-06-23 15:32:11 +02:00
..
2025-02-17 19:49:32 +00:00
2025-04-07 17:00:35 +09:00
2024-03-27 07:11:54 +01:00
2024-03-27 07:11:55 +01:00
2024-12-28 12:24:42 +09:00
2024-10-17 00:49:59 +09:00
2025-05-14 18:06:04 +02:00
2025-04-27 10:36:12 +09:00
2025-05-07 00:49:49 +09:00
2024-03-27 07:12:00 +01:00
2024-03-27 07:12:01 +01:00
2024-03-27 07:12:01 +01:00
2025-06-02 11:19:12 +02:00
2024-03-27 07:12:04 +01:00
2025-05-14 18:06:04 +02:00
2024-03-15 04:04:01 +09:00