machine-id-setup: add a machine_id_commit call to commit on disk a transient machine-id

System Internals / systemd - Didier Roche [ubuntu.com] - 2 December 2014 20:41 UTC

If /etc was read only at boot time with an empty /etc/machine-id, the latter will be mounted as a tmpfs and get reset at each boot. If the system becomes rw later, this functionality enables to commit in a race-free manner the transient machine-id to disk.

979ef53 machine-id-setup: add a machine_id_commit call to commit on disk a transient machine-id
src/core/machine-id-setup.c | 79 +++++++++++++++++++++++++++++++++++++++++++
src/core/machine-id-setup.h | 1 +
src/shared/util.c | 9 +++++
src/shared/util.h | 2 ++
4 files changed, 91 insertions(+)

Upstream: github.com


  • Share