-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a service which waits (max 15 seconds) for the network to be available. We define 'available' as the ability to ping our default router by its name, which implies dns is working. Service units, which really need network to start, should add After=network-online.target Wants=network-online.target
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
DefaultDependencies=no | ||
After=sysinit.target network.target | ||
Before=network-online.target | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=true | ||
TimeoutStartSec=15 | ||
StandardOutput=null | ||
ExecStart=bash -c 'while ! ping -c 1 -w 1 rick.molgen.mpg.de; do sleep 1 ; done' | ||
|
||
[Install] | ||
WantedBy=network-online.target |