[systemd-devel] Unit to test if a domain is reachable

Colin Guthrie gmane at colin.guthr.ie
Fri Jul 18 04:37:03 PDT 2014


'Twas brillig, and Moviuro at 17/07/14 11:41 did gyre and gimble:
> On Thursday 17 July 2014 12:12:22 you wrote:
>> Why not just use network-online.target?
>> http://www.freedesktop.org/software/systemd/man/systemd.special.html#network
>> -online.target
> o If it succeeds, the unit that needs to reach %i gets launched and my 
> reachable-retry@ *does not* enter SUCCESS or whatever "good" state you can 
> think of: it just stays asleep until someone else wants to recheck later if 
> the domain is still reachable (e.g. domain goes down, my ISP goes crazy, I 
> suspend my computer...).
> 
> network-online.target does not fulfill these requirements. It stays in 
> "SUCCESS" across suspend/resume cycles. Therefore, it is *not* a correct 
> indicator.

I don't think any kind of unit is the right approach here. You need
something "active" that listens to events from devices and determines
the best course of action thereafter.

I think anything you glue together with systemd units here will be a bit
of a hack, but perhaps others will disagree.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list