diff options
author | Thomas Haller <thaller@redhat.com> | 2020-04-28 22:12:21 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-30 21:47:30 +0200 |
commit | 02513e4b5da30073f116a8162bfe4fa81c771c31 (patch) | |
tree | 6cf8bf2bbb3865c93a6e4574cbd7684f8353349e /data | |
parent | bee01292f886dcff7114dc421983f1d50f1939b0 (diff) | |
download | NetworkManager-02513e4b5da30073f116a8162bfe4fa81c771c31.tar.gz |
nm-online: allow configuring timeout via NM_ONLINE_TIMEOUT environment
https://bugzilla.redhat.com/show_bug.cgi?id=1828458
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/484
(cherry picked from commit e468b48ab7b8e2ddc8802db4b93e3f13787835e4)
Diffstat (limited to 'data')
-rw-r--r-- | data/NetworkManager-wait-online.service.in | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/data/NetworkManager-wait-online.service.in b/data/NetworkManager-wait-online.service.in index 8963246850..26a8f25362 100644 --- a/data/NetworkManager-wait-online.service.in +++ b/data/NetworkManager-wait-online.service.in @@ -6,9 +6,27 @@ After=NetworkManager.service Before=network-online.target [Service] +# `nm-online -s` waits until the point when NetworkManager logs +# "startup complete". That is when startup actions are settled and +# devices and profiles reached a conclusive activated or deactivated +# state. It depends on which profiles are configured to autoconnect and +# also depends on profile settings like ipv4.may-fail/ipv6.may-fail, +# which affect when a profile is considered fully activated. +# Check NetworkManager logs to find out why wait-online takes a certain +# time. + Type=oneshot -ExecStart=@bindir@/nm-online -s -q --timeout=30 +ExecStart=@bindir@/nm-online -s -q RemainAfterExit=yes +# Set $NM_ONLINE_TIMEOUT variable for timeout in seconds. +# Edit with `systemctl edit NetworkManager-wait-online`. +# +# Note, this timeout should commonly not be reached. If your boot +# gets delayed too long, then the solution is usually not to decrease +# the timeout, but to fix your setup so that the connected state +# gets reached earlier. +Environment=NM_ONLINE_TIMEOUT=30 + [Install] WantedBy=network-online.target |