On Mon, 2013-06-10 at 18:31 +0200, Ignaz Forster wrote:
> Hello,
> 
> during startup we have a few scripts that have to know if the system is 
> online or not. Therefore we wanted to use "nm-online -x" to detect the 
> state, however this fails quite unexpectedly: it seems NetworkManager 
> needs some time between returning and actually listening to requests. In 
> the meantime it will report the system as being offline.

Can you explain a bit more what you mean here?  Do you mean that if you
run NetworkManager, and shortly thereafter, nm-online, that nm-online
will exit before a network connection has started?

> Stopping NetworkManager and calling
>       NetworkManager; nmcli dev
> has the same effect and will result in the message "Error: 
> NetworkManager is not running."
> 
> Is this behavior intentional and / or are there any other ways to get 
> the current state without polling manually?

We could update nm-online with a new option to wait for NM to connect to
D-Bus (it would get the NameOwnerChanged signal from dbus), which would
be fairly trivial.

Dan

_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to