18.06.2017 02:47, Jakob Schürz пишет:
...
> 
> i created a simple script, which checks the connection every minute. Is
> there a connection, and is this connection working (realized with a ping
> to a server in the internet), then network-online.target gets (re)started.
> If there is no connection, or the connection is not working (think about
> WLAN in a train in a tunnel, WLAN is working, but no connection to the
> internet is possible), network-online.target gets stopped.
> 
> Also a simple script in NetworkManager/dispatcher.d/, wich starts
> network-online.target, when a connection changes its state zu up, and
> stop this target, when a connection changes to down.
> 
> All services, which should stop on closing the network-connection have
> the dependency BindsTo=network-online.target
> 
> But i'm not sure, if this is a good solution to change the behaviour of
> network-online.target. Should i create a own target? Or is there
> another, better solution?
> 


systemd is not designed to track network state, nor is
network-online.target meaningful outside of initial boot transaction. So
yes, it would be more clean to use custom target to avoid confusion.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to