This adds a "sysusers.d" snippet for creating the system user "dbus" at
boot, if it is missing, in order to support stateless systems that boot
up with an empty /etc and need static information for determining which
system users to create.
This is only installed on systemd-based systems.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99162
dbusdatadir=$(datadir)/dbus-1
legacydbusdatadir=$(sysconfdir)/dbus-1
dbus_daemon_execdir = $(DBUS_DAEMONDIR)
+# Always lib, even if ${libdir} is lib64 or lib/x86_64-linux-gnu
+systemdsysusersdir = $(prefix)/lib/sysusers.d
DBUS_BUS_LIBS = \
$(CODE_COVERAGE_LDFLAGS) \
dbus.socket.in \
systemd-user/dbus.service.in \
systemd-user/dbus.socket.in \
+ sysusers.d/dbus.conf.in
$(NULL)
systemdsystemunit_DATA = \
dbus.service \
dbus.socket
+
+nodist_systemdsysusers_DATA = \
+ sysusers.d/dbus.conf
endif
if DBUS_ENABLE_USER_SESSION
--- /dev/null
+# sysusers.d snippet for creating the D-Bus system user automatically
+# at boot on systemd-based systems that ship with an unpopulated
+# /etc. See sysusers.d(5) for details.
+
+u @DBUS_USER@ - "System Message Bus"
bus/dbus.socket
bus/systemd-user/dbus.service
bus/systemd-user/dbus.socket
+bus/sysusers.d/dbus.conf
Makefile
dbus/Makefile
bus/Makefile