From 1f1580139ed48dd308a6a2470baf037ae1ed6aab Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 11 Dec 2017 18:27:49 +0000 Subject: [PATCH] resolved.service: set DefaultDependencies=no On systems that only use resolved for name resolution, there are usecases that require resolved to be started before sysinit target, such that network name resolution is available before network-online/sysinit targets. For example, cloud-init for some datasources hooks into the boot process ahead of sysinit target and may need network name resolution at that point already. systemd-resolved already starts pretty early in the process, thus starting it slightly earlier should not have negative side effects. However, this depends on resolved ability to connect to system DBus once that is up. --- units/systemd-resolved.service.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/units/systemd-resolved.service.in b/units/systemd-resolved.service.in index 8059aa7b62..c4c7f1feef 100644 --- a/units/systemd-resolved.service.in +++ b/units/systemd-resolved.service.in @@ -13,8 +13,10 @@ Documentation=man:systemd-resolved.service(8) Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients -After=systemd-networkd.service network.target -Before=network-online.target nss-lookup.target +DefaultDependencies=no +After=systemd-sysusers.service systemd-networkd.service +Before=network.target nss-lookup.target shutdown.target +Conflicts=shutdown.target Wants=nss-lookup.target [Service]