From: Lennart Poettering Date: Tue, 20 Dec 2016 17:14:11 +0000 (+0100) Subject: systemd: add sysusers.d snippet for booting up with unpopulated /etc X-Git-Tag: dbus-1.11.10~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8617fbd27d8ec058511927cabb6a405ebcdca9e;p=thirdparty%2Fdbus.git 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. Reviewed-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99162 --- diff --git a/bus/Makefile.am b/bus/Makefile.am index 268c6f040..b347d466d 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -1,6 +1,8 @@ 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) \ @@ -316,11 +318,15 @@ SCRIPT_IN_FILES += \ 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 diff --git a/bus/sysusers.d/dbus.conf.in b/bus/sysusers.d/dbus.conf.in new file mode 100644 index 000000000..fb35702dd --- /dev/null +++ b/bus/sysusers.d/dbus.conf.in @@ -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_USER@ - "System Message Bus" diff --git a/configure.ac b/configure.ac index 71a085598..c7c762e5b 100644 --- a/configure.ac +++ b/configure.ac @@ -1876,6 +1876,7 @@ bus/dbus.service bus/dbus.socket bus/systemd-user/dbus.service bus/systemd-user/dbus.socket +bus/sysusers.d/dbus.conf Makefile dbus/Makefile bus/Makefile