Red Hat Bugzilla – Bug 114715
Hard Links Created Backwards
Last modified: 2007-04-18 13:02:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Description of problem:
When creating a profile or switching between profiles, the files are
deleted from the profile directories and replaced with hard links to
the running system configuration files.
Because all profile files link to the running system configuration
files, changes to one profile are immediately reflected in the current
configuration and in all other profiles created. When the profile
files are created by hand (by copying and editing the files directly)
and the profile is switched, the same effect occurs.
The problem appears to be in NCProfileList.py. The source and
destination files seem to be reversed with 'devfilename' being the
source and 'profilename' being the destination (as defined in
This problem is easily duplicated.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a new profile with the GUI configuration utility
2. Select the new profile (if not already selected)
3. Change a setting in the new profile
4. Save the settings
5. Examine the inodes of the files under
6. The files in both profiles are linked to the same inodes
Actual Results: Effectively the configuration in one profile is lost
when changes are made to the other profile or when a new profile is
selected because the files are deleted and set to reference the same
Expected Results: The files under each profile should have unique
inodes and the running system configuration files should be linked
(hard or soft) to the current running profile. Switching profiles
shouldn't clobber the second profile's settings.
This problem may be reproduced on Red Hat 9 with
redhat-config-network-1.2.15-1 and on Fedora Core 1 with
I am not cross-posting this bug and hope it doesn't get passed by
because someone thinks it is just a problem with Red Hat 9 which is
reaching "end of life".
how to use profiles:
this may be considered a design bug, which makes it non-intuitive...
You're right - it is a design bug because if a profile is
automatically an exact copy of another profile (and by extension, the
default profile) then it compeltely negates the purpose of having
profiles to begin with.
The document "Working with profiles" says you can have an Away profile
that always starts up the ppp interface and an Office profile that
always starts up the eth0 interface but that only the default profile
is activated at boot time. Here's the problem with that:
[...]/profiles/default/ifcfg-eth0 -> ../../network-scripts/ifcfg-eth0
[...]/profiles/Away/ifcfg-eth0 -> ../../network-scripts/ifcfg-eth0
[...]/profiles/Office/ifcfg-eth0 -> ../../network-scripts/ifcfg-eth0
No matter what, the default profile is activated at boot time because
really there is only ONE profile. On the other hand, if the links
were created like this:
(Inode 123 for example)
[...]/network-scripts/eth0 -> ../../profiles/default/ifcfg-eth0
(Inode 456) /etc/sysconfig/networking/profiles/Away/ifcfg-eth0
(Inode 789) /etc/sysconfig/networking/profiles/Office/ifcfg-eth0
(1) The selected profile would always be the bootable default
(2) Each profile could be unique (not sharing inodes w/default)
(3) The program would match the documentation you referenced
Aliases, yes, I understand. If a laptop user doesn't have root
access, they need a simple way to swap configurations. There isn't
any confusion about that and that isn't what this is related to.
BTW, I already use aliases - basically the same as root doing:
# ifdown eth-home
# ifup eth-office
If the hard links were corrected, one could select "Home" (with root
access of course) before leaving the office and when getting home
voila! It's in the right configuration (and vice-versa).
Please note, only the /etc/sysconfig/networking-scripts files are
linked incorrectly. Please observe the following outputs of 'ls -i':
As you see, the /etc/ files are linked to the active profile. On the
other hand, the /etc/sysconfig/networking/profiles/<profile>/ files
ended up being cross-linked.
Definitely a bug.
This is quite simple to reproduce - I "saved" the default profile,
created a new profile called "Testing", then I saved the new profile
and selected the default profile again and saved again.
Definitely non-intuitive as well.