On Mon, 2020-06-29 at 12:00 -0700, Samuel Sieb wrote:
> On 6/29/20 11:44 AM, John M. Harris Jr wrote:
> > On Monday, June 29, 2020 11:35:55 AM MST Samuel Sieb wrote:
> > > Is there any easy way to convert profiles from ifcfg-rh to
> > > keyfile?
> > 
> > I don't think that'd be a good idea. The Change shows that ifcfg-rh 
> > formatted
> > files will continue to be supported, so it's not required, and
> > there are many
> > people that only know the ifcfg-rh formatted configuration, such as
> > myself.
> > Additionally, there's a lot that could go wrong in yanking config
> > files from
> > one format to the other.
> 
> I wasn't suggesting this to happen by default.  I'm just wondering
> for 
> my own use if it is possible.

Hi,


No convenient way exists. Nor is it strictly necessary at this point.

If we ever completely move away from ifcfg-rh format, then such a tool
will be needed. And it would be useful anyway.

I think the best shot currently is:

  1.) have main.plugins=keyfile,ifcfg-rh configured
  2.) nmcli connection clone "$PROFILE" "$NEW_NAME"

that creates a new profile by copying the existing one, and
NetworkManager will persist it as keyfile. One problem is that this
requires the daemon, and that you cannot directly influence the file
names.


The next step is to expose keyfile API as part of libnm:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/517
which is blocked due to the licensing issue (the code being GPL-2.0+, while 
libnm
is LGPL-2.1+). Once we have that, we can build useful tools that handle keyfile 
format
directly. For example, nmcli working offline on files, or import/export tools, 
or
nm-connection-editor opening .nmconnection files on double click.


best,
Thomas

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

_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to