arvidjaar at gmail.com
Wed Jul 24 09:56:28 PDT 2013
В Wed, 24 Jul 2013 15:10:01 +0800
Kai Hendry <hendry at iki.fi> пишет:
> 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
> 18.104.22.168 && 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. :/
Do you really want all your services that depend on network being up to
fail if your AP is busy and needs 61 seconds to establish connection?
More information about the systemd-devel