[systemd-devel] /etc/systemd/system/darkice.service

Kai Hendry hendry at iki.fi
Wed Jul 24 00:10:01 PDT 2013

On 22 July 2013 23:56, Andrey Borzenkov <arvidjaar at 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 && exit; sleep 1; done; exit 1'

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:
Not sure how to wildcard bind the USB GO Mic here. Any tips?

Kind regards,

More information about the systemd-devel mailing list