GNOME Bugzilla – Bug 696939
keyfile: uuid and id fields should be optional for configuration files created by people
Last modified: 2014-07-09 09:14:06 UTC
The minimal [connection] section of keyfile connection configuration looks like: [connection] id=... uuid=... type=... The only significant item there is the 'type'. Others are just NetworkManager boilerplate. The 'id' attribute should default to the filename. Unless a specific 'id' is used, filenames in /etc/NetworkManager/system-connections are unique and there's no reason not to use them as the default value. Of course it can be overriden by something fancy and pretty like "Ethernet connection 1". Administrators should never be asked to generate 'uuid' for new connections. There is a bunch of possibilites what could be done for connection keyfiles without uuid: 1) It could be written there whenever the connection is read. Simple but ugly. 2) It could be stored in a separate file that would link the file name to the uuid. 3) It could be a hash of the filename. Probably the most elegant way. This bug report specifically applies to administrators who prefer writing configuration files by hand.
This is likely fine, we'd need to do what the ifcfg-rh plugin does for creating the ID and UUID dynamically, which is to create a UUID from the filename since filenames must be unique. The ID comes from the filename too. Note that if you then renamed the file, the UUID changes, and then all sorts of stuff gets reset, like your saved DHCP leases are gone, last-connected timestamp is reset to 0, and seen-bssids are cleared, because all of this is based on the UUID. I have no problem with the administrator not being required to write an ID or UUID, but we should at least write the UUID (and maybe the ID, maybe not) out to the file whenever it gets modified.
Agreed.
*** This bug has been marked as a duplicate of bug 683345 ***