This snippet was already attempting to create /var/lib/dbus/machine-id,
but would fail on volatile or stateless systems where /var/lib/dbus/
did not already exist. systemd-tmpfiles automatically creates parent
directories for tmpfiles of type 'd', 'D', etc., but not for files
or symlinks (https://github.com/systemd/systemd/issues/7853).
Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
[smcv: Extended commit message to clarify why we need this]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104577
Reviewed-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit
aeebf801f1ab462cba3a174440c09a86d326002a)
# Fields: type; path; mode; uid; gid; age; argument (symlink target)
+# Make ${localstatedir}/lib/dbus/
+# Adjust mode and ownership if it already exists.
+d @EXPANDED_LOCALSTATEDIR@/lib/dbus 0755 - - -
+
# Make ${localstatedir}/lib/dbus/machine-id a symlink to /etc/machine-id
# if it does not already exist
L @EXPANDED_LOCALSTATEDIR@/lib/dbus/machine-id - - - - /etc/machine-id