Make NetworkManager connection profiles without changing the current network configuration

I am looking for a way to generate connection profile config files without applying the settings to the currently enabled network interfaces that are already configured.  I am using NetworkManager on an embedded device and I want to fully generate all profile config files before having any of them be applied.  This is to ensure the full update of the embedded device was successful before applying the changes.  So basically, I am looking for a way to use nmcli to generate config files for connection profiles and have them written somewhere, but not have them take effect with the current running instance of NetworkManager.  I don't want the network interfaces current state interrupted since an update application is talking to a remote update server telling it the update status.


Here is the background of what I am currently doing.  I am currently doing this by running NetworkManager in a chroot which uses the new /etc path vs the running system and the config files are written there.  Once the install is successful, the chroot /etc path is setup as the new official path on reboot.  The issue is that running NetworkManager in the chroot requires stopping the NetworkManager for the running system and then using nmcli the new profiles are created.  This results in those changes taking effect immediately and stay until I stop NetworkManager in the chroot environment and restart NetworkManager in the normal runtime environment.  When those changes take effect, I lose connection to my remote update server that is tracking the update status.


Does this write config but don't apply functionality exist?  If not are there any other suggestions other than writing my own NetworkManager profile config file generator?  I want to avoid writing a config file generator as I know over time sometimes newer versions of NetworkManager change the connection profile config file format slightly.


Best Regards,


Matthew Starr


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