chiark / gitweb /
units: make resolved pull in its own .busname unit, but only on kdbus systems
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Jan 2015 21:19:02 +0000 (22:19 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Jan 2015 22:44:08 +0000 (23:44 +0100)
The daemon requires the busname unit to operate, since it contains the
policy that allows it to acquire its service name.

units/org.freedesktop.resolve1.busname
units/systemd-resolved.service.in

index 02588fbfabd3b970e1171e372bfd0f9537a78995..5b7a7fed3f0a04cee95574eadf70967a0d2eaf58 100644 (file)
@@ -10,6 +10,11 @@ Description=Network Name Resolution Service Bus Name
 Documentation=man:systemd-resolved.service(8)
 Documentation=http://www.freedesktop.org/wiki/Software/systemd/resolved
 
 Documentation=man:systemd-resolved.service(8)
 Documentation=http://www.freedesktop.org/wiki/Software/systemd/resolved
 
+# This is pulled in by systemd-resolved.service, since it cannot run
+# without its policy set. However, let's conditionalize this unit on
+# non-kdbus system.
+ConditionPathExists=/sys/fs/kdbus/0-system/
+
 [BusName]
 Service=systemd-resolved.service
 AllowWorld=talk
 [BusName]
 Service=systemd-resolved.service
 AllowWorld=talk
index 01336216221c298ae9d0fda648553e249ed7a9c3..e06868494b08cab69c6e70a386a3b04a16048047 100644 (file)
@@ -10,6 +10,11 @@ Description=Network Name Resolution
 Documentation=man:systemd-resolved.service(8)
 After=systemd-networkd.service network.service
 
 Documentation=man:systemd-resolved.service(8)
 After=systemd-networkd.service network.service
 
+# On kdbus systems we pull in the busname explicitly, because it
+# carries policy that allows the daemon to acquire its name.
+Wants=org.freedesktop.resolve1.busname
+After=org.freedesktop.resolve1.busname
+
 [Service]
 Type=notify
 Restart=always
 [Service]
 Type=notify
 Restart=always