From 8b50b1025e5ab2e0ca51b4c21a573adbd40ac185 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 11 Sep 2017 16:28:28 +0200 Subject: apt-daily: Do not Wants=network-online, and add some more After= We now wait for being online ourselves, so all we need to wait on is for services we are using to be online first. This avoids severe boot slowdowns by other services having specified an After=network-online.target without a Wants=. Gbp-Dch: Full --- cmdline/apt-helper.cc | 1 + debian/apt-daily.service | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index 30647048b..af8421f41 100644 --- a/cmdline/apt-helper.cc +++ b/cmdline/apt-helper.cc @@ -199,6 +199,7 @@ static bool ServiceIsActive(const char *service) static bool DoWaitOnline(CommandLine &CmdL) { + // Also add services to After= in .service static const char *WaitingTasks[][6] = { {"systemd-networkd.service", "/lib/systemd/systemd-networkd-wait-online", "-q", "--timeout=30", nullptr}, {"NetworkManager.service", "nm-online", "-q", "--timeout", "30", nullptr}, diff --git a/debian/apt-daily.service b/debian/apt-daily.service index c81d3ea01..f060487e6 100644 --- a/debian/apt-daily.service +++ b/debian/apt-daily.service @@ -2,8 +2,7 @@ Description=Daily apt download activities Documentation=man:apt(8) ConditionACPower=true -After=network-online.target -Wants=network-online.target +After=network.target network-online.target systemd-networkd.service NetworkManager.service connman.service [Service] Type=oneshot -- cgit v1.2.3