[Fedora-directory-users] FHS packaging - combine old and new with symlinks

Mark A. Schwenk mas at wellthot.com
Mon Jul 17 20:52:23 UTC 2006


Mike Jackson wrote:
> Mark A. Schwenk wrote:
> 
>>
>> For example copying /etc/named.conf to /etc/named.conf.bak before 
>> modifying it and then afterward discovering that /etc/named.conf and 
>> /etc/named.conf.bak are now both symbolic links to the same changed 
>> copy of the real file in /var/named/chroot/etc/named.conf.
> 
> 
> Which filesystem are you using?
> 
> Ext3:
> 
> # echo foobar > 1
> # ln -s 1 2
> # cp 2 3
> # ls -al
> -rw-r--r--  1 jacksonm users  7 Jul 17 22:17 1
> lrwxrwxrwx  1 jacksonm users 10 Jul 17 22:18 2 -> 1
> -rw-r--r--  1 jacksonm users  7 Jul 17 22:18 3
> 
> 

Ext3. Right you are. I was trying to quickly provide an example of how 
the symbolic links can bite back and didn't think through it clearly.

How about this:

# mv /etc/named.conf /etc/named.conf.bak
# cp /etc/named.conf.bak /etc/named.conf

At this point /etc/named.conf.bak is a symbolic link to 
/var/named/chroot/etc/named.conf and /etc/named.conf is a regular file.

Then editing the /etc/named.conf file no longer modifies the real source 
file at /var/named/chroot/etc/named.conf.

-Mark Schwenk




More information about the Fedora-directory-users mailing list