On 22 July 2013 23:56, Andrey Borzenkov <arvidj...@gmail.com> wrote: > network-online.target has no requirement for pingtest.service. All that > this configuration does is delaying network-online.target by at most 60 > seconds, that's all. If network is not up at this point - too bad.
That ping switch Lennart proposed, -w 60 or -W 60 doesn't actually wait if there is no network. So I've ended up with a shell script: ExecStart=/usr/bin/bash -c 'for i in `seq 60`; do ping -c 1 -nq 8.8.8.8 && exit; sleep 1; done; exit 1' http://sprunge.us/KbUZ Which seems to work, however I can't seem to make network-online.target depend on pingtest.service with `RequiredBy=network-online.target` in the pingtest.service file. So even if pingtest fails, network-online.target ends up being active. :/ With the darkice service file, I ended up with http://sprunge.us/VXRU Restart=on-failure was needed since sometimes it would fail to start. No idea why. I can't confirm it was restarted in that cases since `systemctl status darkice.service` doesn't tell me this. Another problem is that if someone manages to connect the USB microphone in the wrong USB port, it fails to start: http://ix.io/6Ql Not sure how to wildcard bind the USB GO Mic here. Any tips? Kind regards, _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel