summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-13 18:40:54 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-31 14:55:16 +0200
commitead7af30939e3f1903455c7e06bc7cfeef54d4a2 (patch)
tree8c3778dba8e1158846c359d33c0041f55ca80046
parentunits: make systemd-homed.service installable (diff)
downloadsystemd-ead7af30939e3f1903455c7e06bc7cfeef54d4a2.tar.xz
systemd-ead7af30939e3f1903455c7e06bc7cfeef54d4a2.zip
units: make systemd-userdbd.{socket,service} installable
It's lightweight and generally useful, so it should be enabled by default. But users might want to disable it for whatever reason, and things should be fine without it, so let's make it installable so it can be disabled if wanted. Fixes #15175.
-rw-r--r--presets/90-systemd.preset1
-rw-r--r--units/meson.build3
-rw-r--r--units/systemd-userdbd.service.in3
-rw-r--r--units/systemd-userdbd.socket3
4 files changed, 8 insertions, 2 deletions
diff --git a/presets/90-systemd.preset b/presets/90-systemd.preset
index 53eb8a7806..db61ef12d3 100644
--- a/presets/90-systemd.preset
+++ b/presets/90-systemd.preset
@@ -21,6 +21,7 @@ enable systemd-networkd.service
enable systemd-resolved.service
enable systemd-repart.service
enable systemd-homed.service
+enable systemd-userdbd.socket
disable console-getty.service
disable debug-shell.service
diff --git a/units/meson.build b/units/meson.build
index d8ee6df184..8ec9eb94e4 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -139,8 +139,7 @@ units = [
'sysinit.target.wants/'],
['systemd-udevd-kernel.socket', '',
'sockets.target.wants/'],
- ['systemd-userdbd.socket', 'ENABLE_USERDB',
- 'sockets.target.wants/'],
+ ['systemd-userdbd.socket', 'ENABLE_USERDB'],
['time-set.target', ''],
['time-sync.target', ''],
['timers.target', ''],
diff --git a/units/systemd-userdbd.service.in b/units/systemd-userdbd.service.in
index e30ed2109e..3b76705373 100644
--- a/units/systemd-userdbd.service.in
+++ b/units/systemd-userdbd.service.in
@@ -39,3 +39,6 @@ SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
Type=notify
@SERVICE_WATCHDOG@
+
+[Install]
+Also=systemd-userdbd.socket
diff --git a/units/systemd-userdbd.socket b/units/systemd-userdbd.socket
index 1c749ea1d2..2b4bb7a87a 100644
--- a/units/systemd-userdbd.socket
+++ b/units/systemd-userdbd.socket
@@ -17,3 +17,6 @@ Before=sockets.target
ListenStream=/run/systemd/userdb/io.systemd.Multiplexer
Symlinks=/run/systemd/userdb/io.systemd.NameServiceSwitch
SocketMode=0666
+
+[Install]
+WantedBy=sockets.target