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 =

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 i...@mir2.org пишет: 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

[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

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 i...@mir2.org пишет: 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

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 only).

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, but on