GNOME Bugzilla – Bug 682570
system connection files are renamed to match the id field
Last modified: 2012-11-01 11:08:03 UTC
Hello, I'm not sure if this is a bug or just something not a documented requirement. Here's the issue. I've created a RPM that has multiple system connections, all using the keyfile plugin format. Many of the connections aren't named the same as the string in the id field For example: /etc/NetworkManager/system-connections/Gnat [connection] id=Gnat Office /etc/NetworkManager/system-connections/Sunridge [connection] id=UCMC Sunridge etc... I'm not sure when or what triggers it however eventually the connection file is duplicated and named to the string in the id. The old file isn't removed. There are differences between it and the newly created file: -read-only=true -proto=rsn +proto=rsn; It causes problems when I upgrade the connections since it leaves these non-rpm controlled files in place. So is this a bug? Or should I be naming these after the id string? Also I'm slightly unsure/concerned how it removes the read-only attribute...
Expected behavior is one of: 1) don't accept connections where file name and id don't match In this case the id could just be left out as it can be read from the filename. 2) accept it but never move around configuration files
(In reply to comment #0) > I'm not sure when or what triggers it however eventually the connection file is > duplicated and named to the string in the id. The old file isn't removed. > The thing is that when connection is saved the new file name is generated according to connection's name (ID). However, the old file *is* removed. There was a bug causing not removing the old files, but that was fixed a year ago. You may use an older NM version. Nonetheless, I still think we shouldn't rename files on updating connection. (In reply to comment #1) > 2) accept it but never move around configuration files I'd go with this option. I think it makes sense to allow different IDs and file names.
Created attachment 227151 [details] [review] [PATCH] keyfile: don't rename files on connection updates
Looks good, would push it but as we have 'pavlix/keyfile' branch anyway, I pushed it there first. commit 2937c4645a44549afa1008c8adc8bb6c95785679 Author: Jiří Klimeš <jklimes@redhat.com> Date: Thu Oct 25 12:15:09 2012 +0200 keyfile: don't rename system connection files (bgo #682570) When updating connections, it is less confusing to reuse the existing file instead of renaming files according to connection's ID. That reduces surprises of moving connection files when a connection is edited. It will be merged soon together with the other 'keyfile' stuff.
As 'pavlix/keyfile' is not yet ready, I'm pushing this patch alone.