chiark / gitweb /
machine-id-setup: add a machine_id_commit call to commit on disk a transient machine-id
authorDidier Roche <didrocks@ubuntu.com>
Mon, 24 Nov 2014 08:43:29 +0000 (09:43 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 3 Dec 2014 02:41:19 +0000 (03:41 +0100)
commit979ef53a268d6f54a309fc5c6015df5d4accbbd5
treedceff9f60062e5e39173f735b4511236d90bd9b0
parent3543f8218b732132dff6d0dccb2ce357e4154801
machine-id-setup: add a machine_id_commit call to commit on disk a transient machine-id

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.
src/core/machine-id-setup.c
src/core/machine-id-setup.h
src/shared/util.c
src/shared/util.h