mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 04:40:04 +01:00
Since both `NetworkManager.service` and `NetworkManager-initrd.service` are allocated for the same bus name (`org.freedesktop.NetworkManager`) and this is not allowed, the best option is to use a systemd generator to install them only in the initrd, instead of setting fixed Install sections. Fixes #1814
23 lines
871 B
SYSTEMD
23 lines
871 B
SYSTEMD
[Unit]
|
|
Description=NetworkManager Wait Online (initrd)
|
|
AssertPathExists=/etc/initrd-release
|
|
DefaultDependencies=no
|
|
Requires=NetworkManager-initrd.service
|
|
After=NetworkManager-initrd.service
|
|
Before=network-online.target
|
|
ConditionPathExists=/run/NetworkManager/initrd/neednet
|
|
|
|
[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
|
|
RemainAfterExit=yes
|
|
Environment=NM_ONLINE_TIMEOUT=3600
|