Re: Issue with "temporary" option of nmcli mod

On Thu, 2019-12-26 at 13:46 -0800, Abbott Clark via networkmanager-list 

    I am trying to set the below temporarily:
      nmcli con mod --temporary  ep65s0f1 connection.autoconnect yes

    The connection.autoconnect is correctly set to "yes" in memory
the ONBOOT option in the ifcfg-ep65s0f1 file is still "no" as

    However after the above command, if I modify any other
parameters, for e.g.
      nmcli con mod ep65s0f1 ipv4.never-default yes

    the ONBOOT option in the ifcfg-ep65s0f1 file is set to "yes".

    Can I please know what is the correct way to set
"connection.autoconnect" in memory only and not have NetworkManager
write the temporary configuration to the ifcfg file on subsequent
configuration changes.


if you subsequently issue `nmcli connection modify` without "temporary"
enabled, it means to persist the profile. If it was temporary before,
it will (again) write it to disk.

Note that in recent versions of NM (>= 1.20), also such "temporary"
profiles are persisted to the file system. Check `nmcli -f all
connection`, which shows that these profiles instead reside in
/run/NetworkManager directory.

nmcli calls Update2() method on D-Bus (or libnm), which has more flags
that also allows to say "keep it temporary, if the profile is temporary
already". See [1].


Also, if all you want that a profile does not temporarily autoactivate,
then `nmcli connection down` sufficies. That deactivates the profile
and blocks it from autoconnect (without changing the profile's
"connection.autoconnect" setting). Note that these are two separate
things: the profile's "connection.autoconnect" setting, and whether a
profile is blocked form autoconnecting. Arguably, a subsequent `nmcli
connection modify` will again unblock autoconnect of the profile...


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]