| 1 |
[Unit] |
| 2 |
Description=Network Manager Wait Online |
| 3 |
Documentation=man:NetworkManager-wait-online.service(8) |
| 4 |
Requires=NetworkManager.service |
| 5 |
After=NetworkManager.service |
| 6 |
Before=network-online.target |
| 7 |
|
| 8 |
[Service] |
| 9 |
# `nm-online -s` waits until the point when NetworkManager logs |
| 10 |
# "startup complete". That is when startup actions are settled and |
| 11 |
# devices and profiles reached a conclusive activated or deactivated |
| 12 |
# state. It depends on which profiles are configured to autoconnect and |
| 13 |
# also depends on profile settings like ipv4.may-fail/ipv6.may-fail, |
| 14 |
# which affect when a profile is considered fully activated. |
| 15 |
# Check NetworkManager logs to find out why wait-online takes a certain |
| 16 |
# time. |
| 17 |
|
| 18 |
Type=oneshot |
| 19 |
ExecStart=@bindir@/nm-online -s -q |
| 20 |
RemainAfterExit=yes |
| 21 |
|
| 22 |
# Set $NM_ONLINE_TIMEOUT variable for timeout in seconds. |
| 23 |
# Edit with `systemctl edit NetworkManager-wait-online`. |
| 24 |
# |
| 25 |
# Note, this timeout should commonly not be reached. If your boot |
| 26 |
# gets delayed too long, then the solution is usually not to decrease |
| 27 |
# the timeout, but to fix your setup so that the connected state |
| 28 |
# gets reached earlier. |
| 29 |
Environment=NM_ONLINE_TIMEOUT=60 |
| 30 |
|
| 31 |
[Install] |
| 32 |
WantedBy=network-online.target |