]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
docs/NETWORK_ONLINE: fix example
authorGeert Lorang <geert@lorang.be>
Wed, 8 Feb 2023 16:10:28 +0000 (17:10 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 8 Feb 2023 16:53:53 +0000 (16:53 +0000)
Type=oneshot is necessary for systemd to actually wait for the service
to return. With RemainAfterExit=yes it won't be started again.

Fixes #26342.

docs/NETWORK_ONLINE.md

index 084f0d138199b4c0de8188427efb64b45353d977..aec27ed5a4431d3349f6b1ef9c3575cee279dfe6 100644 (file)
@@ -252,6 +252,8 @@ established), the following simple service could be used:
 DefaultDependencies=no
 After=nss-lookup.target
 Before=network-online.target
+Type=oneshot
+RemainAfterExit=yes
 
 [Service]
 ExecStart=sh -c 'while ! ping -c 1 example.com; do sleep 1; done'