-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overlay/live: reconfigure NetworkManager-wait-online in the real root
This adds coreos-liveiso-reconfigure-nm-wait-online.service which will configured NetworkManager-wait-online.service in the real root timeout quicker and also not show a failure if there is no connection. Doing this for the Live ISO improves the user experience when booting the Live ISO without network.
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
.../05core/usr/lib/dracut/modules.d/20live/coreos-liveiso-reconfigure-nm-wait-online.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Configure NetworkManager-wait-online in the real root for the | ||
# Live ISO to timeout quicker and also not explicitly fail since | ||
# booting the Live ISO without network is a valid use case. | ||
# | ||
# Doing this improves the user experience when booting the | ||
# Live ISO without network. | ||
|
||
[Unit] | ||
Description=Reconfigure NetworkManager-wait-online service | ||
DefaultDependencies=no | ||
# Make sure we are in the initramfs and we are booted to the live ISO | ||
ConditionPathExists=/usr/lib/initrd-release | ||
ConditionKernelCommandLine=coreos.liveiso | ||
ConditionPathExists=/run/ostree-live | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
# Note keep this in sync with NetworkManager-wait-online.service | ||
# Right now we are keeping the same ExecStart but we are making it | ||
# OK to fail (`-`) and timeout sooner (5 seconds vs 30). | ||
ExecStartPre=/usr/bin/mkdir -p /run/systemd/system/NetworkManager-wait-online.service.d | ||
ExecStart=/bin/bash -c 'echo -e "[Service]\nExecStart=\nExecStart=-/usr/bin/nm-online -s -q --timeout=5" > /run/systemd/system/NetworkManager-wait-online.service.d/liveiso.conf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters