summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-05-15 22:59:24 +0200
committerTom Gundersen <teg@jklm.no>2015-05-15 22:59:43 +0200
commitb5acb956d1ceca70e1fc7546534b43b7d81322cc (patch)
tree99a33c3b7a2a4b774d9c9732236f30ad487daeae
parenta542c4dc43db906b30ea6b2b1192cf87b01f572e (diff)
units: make networkd pull in its own .busname unit
The daemon requires the busname unit to operate (on kdbus systems), since it contains the policy that allows it to acquire its service name. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=90287
-rw-r--r--Makefile.am2
-rw-r--r--units/.gitignore1
-rw-r--r--units/systemd-networkd.service.m4.in (renamed from units/systemd-networkd.service.in)7
3 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 861f3b2e43..211ce6ab6f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5920,7 +5920,7 @@ gperf_gperf_sources += \
src/network/networkd-netdev-gperf.gperf
EXTRA_DIST += \
- units/systemd-networkd.service.in \
+ units/systemd-networkd.service.m4.in \
units/systemd-networkd-wait-online.service.in
endif
diff --git a/units/.gitignore b/units/.gitignore
index b8f0a0b723..d45492d06b 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -48,6 +48,7 @@
/systemd-modules-load.service
/systemd-networkd-wait-online.service
/systemd-networkd.service
+/systemd-networkd.service.m4
/systemd-nspawn@.service
/systemd-poweroff.service
/systemd-quotacheck.service
diff --git a/units/systemd-networkd.service.in b/units/systemd-networkd.service.m4.in
index 5a91b8e499..7f216f331c 100644
--- a/units/systemd-networkd.service.in
+++ b/units/systemd-networkd.service.m4.in
@@ -17,6 +17,13 @@ Before=network.target multi-user.target shutdown.target
Conflicts=shutdown.target
Wants=network.target
+m4_ifdef(`ENABLE_KDBUS',
+# On kdbus systems we pull in the busname explicitly, because it
+# carries policy that allows the daemon to acquire its name.
+Wants=org.freedesktop.network1.busname
+After=org.freedesktop.network1.busname
+
+)m4_dnl
[Service]
Type=notify
Restart=on-failure