0

Is there a command or shell script for converting a network script /etc/sysconfig/network-scripts/ifcfg-XXX to /etc/NetworkManager/system-connections/XXX.nmconnection config file?

I am currently using the ifcfg-rh plugin and it works fine, but I want to have all interface configuration at one place. I think I could rewrite it manually for one or two interfaces, but I have to do it on several servers.

2

There isn't a straightforward simple way to do this. There might never be as converting between different configurations is fraught with error.

That said if the keyfile plugin is listed first before the ifcfg-rh plugin (check NetworkManager --print-config), then cloning the old connection profile (nmcli con clone oldprofile newprofile) will create the new cloned profile in the keyfile format. You could then switch/up to the new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.