Re: Where does NM persists which connection is active? (Centos7)

On Sun, 2016-09-11 at 15:45 +0300, Edward Haas wrote:

Assuming there are multiple connection defined for an ethernet device
and only a single one is active, how can I detect which ifcfg file
was used for the connection?

I cannot use nmcli for this, as NetworkManager is down at the moment
I need the information.
I just hope this info is available somewhere (as when starting NM,
the correct connection is activated).



If NetworkManager is not running, there isn't a concept of "active
connection". What would that be?

When NM starts and the device has IP configuration, NM will pick a
connection that matches to what is currently configured on the
interface. In my opinion, that is a wrong thing, but that is what
currently happens. is
supposed to improve on that, and it also will write a state-file that
contains which connection was active on a device when NetworkManager
When the device has no IP configuration at startup, NetworkManager will
autoconnect one of the available connections. Thereby it takes into
account connection.autoconnect-priority and connection.timestamp.

Maybe it would be helpful to explain what you are trying to do as an
end-goal. If NetworkManager is not running, why would you want to know
which connection was active when it stopped?


Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]