summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>2018-03-11 21:48:46 +0000
committerThomas Haller <thaller@redhat.com>2018-03-14 10:24:45 +0100
commit167e42a87e97ed7fb26a4263c22f1774716ac51b (patch)
tree83bdc4682f3253161aa20a05232ec81073bd2e21
parent17009ed91da8b3e0b10ee7e94d220be9bd3fa84c (diff)
downloadNetworkManager-167e42a87e97ed7fb26a4263c22f1774716ac51b.tar.gz
systemd: make enablement of n-m-wait-online.service follow n-m.service
This is the approach used by systemd-networkd. I don't understand the logic that caused systemd-networkd to make the change - https://github.com/systemd/systemd/commit/9e49656037717b96c06b1f1507a41550bdb2c795 Instead, I am suggesting it for consistency, and because it seems to me this is the exact correct behaviour. Because if you enable NetworkManager, and rely on it to configure your network devices, then network mounts will not start correctly at boot time unless you also enable NetworkManager-wait-online.service. Enabling NetworkManager-wait-online.service does not cause unnecessary serialization of the boot process; it is only pulled in if something else (like a network mount) pulls in network-online.target. I am suggesting this in response to reading this user support request [1]. [1] https://unix.stackexchange.com/questions/429604/fstab-not-automatically-mounting-smb-storage [thaller@redhat.com: reworded commit message] https://github.com/NetworkManager/NetworkManager/pull/76
-rw-r--r--data/NetworkManager.service.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in
index 95d58f9682..2692935ea9 100644
--- a/data/NetworkManager.service.in
+++ b/data/NetworkManager.service.in
@@ -27,3 +27,8 @@ WantedBy=multi-user.target
Alias=dbus-org.freedesktop.NetworkManager.service
Also=NetworkManager-dispatcher.service
+# We want to enable NetworkManager-wait-online.service whenever this service
+# is enabled. NetworkManager-wait-online.service has
+# WantedBy=network-online.target, so enabling it only has an effect if
+# network-online.target itself is enabled or pulled in by some other unit.
+Also=NetworkManager-wait-online.service