mirror of
https://git.proxmox.com/git/ifupdown2
synced 2025-08-05 00:04:18 +00:00

commit 214bc505ac
removed this by
mistake. While I fix it before detecting that (thank Wolfgang!) lets
restore it more like the state it was.
Add missing ordering:
After=network-pre.target
See systemd.special(7)'s description of this target
After=systemd-sysctl.service
ifupdown does the same - we want net.*.conf.default.*
sysctl keys to apply to newly created interfaces
After=systemd-modules-load.service
ifupdown does the same, though this should be mostly
optional as modules should be autoloaded anyway
Before=network.target
This is required to prevent services which require
network to be started too early and listen on wrong
addresses (iow. only on loopback or ipv4-only).
Before=network-online.target
See systemd.special(7)'s description. We are the
provider of this target.
Before=shutdown.target
ifupdown does it this way, it also makes more sense
given the Conflict entry, compared to the previous
WantedBy entry in [Install]
Changed install section:
WantedBy=multi-user.target
I wasn't sure about this. ifupdown does this.
basic.target didn't seem useful since we actually want:
WantedBy=network-online.target
We provide this, so we should be installed into it.
removed WantedBy=network.target
We strictly want to be ordered before this and instead
are required by multi-user.target already.
removed WantedBy=shutdown.target
I didn't see the point.
Originally-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
Date: Thu, 30 Jan 2020 12:48:23 +0100
|
|
Subject: [PATCH] networking.service: fix dependencies and ordering
|
|
|
|
IMPORTANT: DO NOT REMOVE IF UNSURE!
|
|
|
|
ONLY IF IFUPDOWN2 FIXED THEIR SERVICE MESS.
|
|
|
|
THEY CLOSED TWO PULL REQUESTS ALREADY WITHOUT REASON.
|
|
|
|
SO WE JUST HAVE TO KEEP THIS DOWNSTREAM PATCH!
|
|
|
|
BIG WARNING HERE IS DONE BECAUSE IT WAS ALREADY REMOVED BY MISTAKE
|
|
ONCE!!
|
|
|
|
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
---
|
|
debian/ifupdown2.networking.service | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/debian/ifupdown2.networking.service b/debian/ifupdown2.networking.service
|
|
index b2acd97..ad9bad3 100644
|
|
--- a/debian/ifupdown2.networking.service
|
|
+++ b/debian/ifupdown2.networking.service
|
|
@@ -2,8 +2,10 @@
|
|
Description=Network initialization
|
|
Documentation=man:interfaces(5) man:ifup(8) man:ifdown(8)
|
|
DefaultDependencies=no
|
|
-Before=shutdown.target
|
|
Conflicts=shutdown.target
|
|
+Wants=network.target
|
|
+After=local-fs.target network-pre.target systemd-sysctl.service systemd-modules-load.service
|
|
+Before=network.target shutdown.target network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
@@ -15,4 +17,4 @@ ExecStop=/sbin/ifdown -a
|
|
ExecReload=/sbin/ifreload -a
|
|
|
|
[Install]
|
|
-WantedBy=basic.target network.target shutdown.target
|
|
+WantedBy=multi-user.target network-online.target
|