Re: [systemd-devel] network-online.target is not down when a physical network is down

2015-01-28 Thread Igor Bukanov
Just for references. With the the following script placed in /etc/NetworkManager/dispatcher.d/90-online-monitor everything works. As the service is started explicitly the unit file needs no Install section. #!/bin/sh status="$(nmcli -f STATE -t g)" if [ "_$status" = _connected -o "_$status" = "_co

Re: [systemd-devel] network-online.target is not down when a physical network is down

2015-01-22 Thread Dan Williams
On Thu, 2015-01-22 at 21:17 +0100, Igor Bukanov wrote: > Hm, checking nmcli -f STATE -t g does not work from a Networkmanager > dispatcher script. If I disable WiFi, that gives in the dispatcher > script "connected (local only)". If I enable WiFi, then in the > dispatcher I have "connected (site on

Re: [systemd-devel] network-online.target is not down when a physical network is down

2015-01-22 Thread Igor Bukanov
Hm, checking nmcli -f STATE -t g does not work from a Networkmanager dispatcher script. If I disable WiFi, that gives in the dispatcher script "connected (local only)". If I enable WiFi, then in the dispatcher I have "connected (site only)". Only some moments later the state becomes "connected", bu

Re: [systemd-devel] network-online.target is not down when a physical network is down

2015-01-22 Thread Dan Williams
On Thu, 2015-01-22 at 19:51 +0300, Andrei Borzenkov wrote: > В Thu, 22 Jan 2015 16:44:52 +0100 > Igor Bukanov пишет: > > > For a service that should be shutdown when network is not available, I > > tried to use Requires=network-online.target . However, on Fedora 21 > > with NetworkManager that do

Re: [systemd-devel] network-online.target is not down when a physical network is down

2015-01-22 Thread Andrei Borzenkov
В Thu, 22 Jan 2015 16:44:52 +0100 Igor Bukanov пишет: > For a service that should be shutdown when network is not available, I > tried to use Requires=network-online.target . However, on Fedora 21 > with NetworkManager that does not work. When I switch off WiFi, the > only connection on my laptop

[systemd-devel] network-online.target is not down when a physical network is down

2015-01-22 Thread Igor Bukanov
For a service that should be shutdown when network is not available, I tried to use Requires=network-online.target . However, on Fedora 21 with NetworkManager that does not work. When I switch off WiFi, the only connection on my laptop that can configure default IP route and setup /etc/resolv.conf,