From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7
Description of problem:
Changing a host name in the Hosts tab and then using File->Save results in a corrupt /etc/hosts file. The entry for the host you renamed won't appear in the host list. Things get even more messed if you continue renaming hosts and saving after that.
There's a logic error in how the host profiles are saved. Look in NCProfileList.py for ...
# delete all other entries the user has deleted in the UI
..and think about the case when a host is renamed, since all of this logic is driven by host names.
It turns out, however, the if you save _twice_ after editing, things will work out OK - so the following patch appears to work-around the problem.
--- src/netconfpkg/gui/maindialog.py~ 2005-03-30 05:59:01.000000000 -0800
+++ src/netconfpkg/gui/maindialog.py 2005-11-19 10:15:25.000000000 -0800
@@ -402,6 +402,7 @@
self.appBar.push(_("Saving profile configuration..."))
profilelist = getProfileList()
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Go to the Hosts tab.
2.Add some hosts
4.Look in /etc/hosts, and you should see your new hosts
5.Now, pick a host and hit Edit.
6.Change the host name (I've been changing the aliases as well, but that probably has no impact)
8.Look in /etc/hosts again, and you should be missing an entry
10.Look in /etc/hosts and it should look OK.
I can reproduce with redhat-config-network in RHEL3. It's probably also in other releases.
I see this problem hasn't been fixed yet.
While trying to reproduce it on the latest rawhide, I noticed that you have to
have more than 1 entry in the host list (apart from local host) to reproduce.
Create entries for "foo", "bar", and "baz". Save & Exit. Then restart, rename
"bar" to "gar" and Save. Look in /etc/hosts and you'll only see localhost, foo
and baz. Save again and gar will appear.
This is still a bug in FC5. I've updated the Version to FC5. Is that the right
thing to do?
system-config-network-1.4.7-1.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update system-config-network'
system-config-network-1.4.7-1.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.