В Wed, 24 Jul 2013 15:10:01 +0800 Kai Hendry <[email protected]> пишет:
> On 22 July 2013 23:56, Andrey Borzenkov <[email protected]> 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. :/ > 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? _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
