From 635c2084d355e24d0425258892e33eb86aebdde6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 20 Dec 2016 18:14:11 +0100 Subject: [PATCH] systemd: add sysusers.d snippet for booting up with unpopulated /etc 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. --- bus/Makefile.am | 5 +++++ bus/dbus.conf | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 bus/dbus.conf diff --git a/bus/Makefile.am b/bus/Makefile.am index 268c6f0..c1afd30 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -1,6 +1,7 @@ dbusdatadir=$(datadir)/dbus-1 legacydbusdatadir=$(sysconfdir)/dbus-1 dbus_daemon_execdir = $(DBUS_DAEMONDIR) +systemdsysusersdir = $(libdir)/sysusers.d DBUS_BUS_LIBS = \ $(CODE_COVERAGE_LDFLAGS) \ @@ -316,11 +317,15 @@ SCRIPT_IN_FILES += \ dbus.socket.in \ systemd-user/dbus.service.in \ systemd-user/dbus.socket.in \ + dbus.conf \ $(NULL) systemdsystemunit_DATA = \ dbus.service \ dbus.socket + +dist_systemdsysusers_DATA = \ + dbus.conf endif if DBUS_ENABLE_USER_SESSION diff --git a/bus/dbus.conf b/bus/dbus.conf new file mode 100644 index 0000000..eba82a2 --- /dev/null +++ b/bus/dbus.conf @@ -0,0 +1,5 @@ +# 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 - "System Message Bus" -- 2.7.4