From 5ca4fbf2cfe781efedc7c078acaa826c6ad39b10 Mon Sep 17 00:00:00 2001 From: spmfox Date: Tue, 27 Aug 2024 17:34:55 -0400 Subject: converting to roles, converting from runlabels to quadlet ~ breaking change --- roles/host/files/check-network-online.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 roles/host/files/check-network-online.service (limited to 'roles/host/files') diff --git a/roles/host/files/check-network-online.service b/roles/host/files/check-network-online.service new file mode 100644 index 0000000..afadbfe --- /dev/null +++ b/roles/host/files/check-network-online.service @@ -0,0 +1,14 @@ +#This is needed because user units cannot check or interact with system units such as network-online.target +#https://github.com/containers/podman/issues/22197 +#https://github.com/systemd/systemd/issues/3312 + +[Unit] +Description=Check for system level network-online.target (for users) + +[Service] +Type=oneshot +ExecStart=bash -c 'until systemctl is-active network-online.target; do sleep 1; done' +RemainAfterExit=yes + +[Install] +WantedBy=default.target -- cgit