Browse Source

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
tags/devuan/2.0.1+devuan1
Julian Andres Klode 3 years ago
parent
commit
8b50b1025e
2 changed files with 2 additions and 2 deletions
  1. +1
    -0
      cmdline/apt-helper.cc
  2. +1
    -2
      debian/apt-daily.service

+ 1
- 0
cmdline/apt-helper.cc View File

@@ -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},


+ 1
- 2
debian/apt-daily.service View File

@@ -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


Loading…
Cancel
Save