FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 10-08-2011, 01:36 PM
Ljubomir Ljubojevic
 
Default multiple ifcfg-x locations on CentOS-6

Vreme: 10/08/2011 01:10 AM, Nicolas Thierry-Mieg piše:
> James B. Byrne wrote:
>> $ ll /sysconfig/networking/profiles/*
>> total 24
>> -rw-r--r--. 2 root root 158 Oct 7 15:19 hosts
>> -rw-r--r--. 2 root root 116 Oct 7 15:19 ifcfg-br0
>> -rw-r--r--. 2 root root 238 Oct 7 15:24 ifcfg-eth0
>> -rw-r--r--. 2 root root 117 Oct 7 15:19 ifcfg-eth1
>> -rw-r--r--. 2 root root 40 Oct 7 15:19 network
>> -rw-r--r--. 2 root root 120 Oct 7 15:25 resolv.conf
>>
>>
>> $ ll /etc/sysconfig/networking/devices
>> total 12
>> -rw-r--r--. 2 root root 116 Oct 7 15:19 ifcfg-br0
>> -rw-r--r--. 2 root root 238 Oct 7 15:24 ifcfg-eth0
>> -rw-r--r--. 2 root root 117 Oct 7 15:19 ifcfg-eth1
>
> ^
> look at that 2 there
>
>> My questions are: What are these duplicate, and
>> identical, files doing in multiple places on my system;
>
> those are hard-linked, most likely the same file in both subdirs (not
> identical files, a single file hard-linked twice)
>
> the /etc/sysconfig/networking/* subdirs can exist on C5 as well, I think
> they're used by system-config-network
>
>
>> and why are they evidently interfering with the normal
>> processing of /etc/sysconfig/network-scripts through the
>> service utility?
>
> on a C6 machine I have those dirs are empty, as on your C5 system. I
> probably never used system-config-network on it. Networking through
> /etc/init.d/network functions fine without them.

Files in /sysconfig/networking/profiles/ are not hardlinks. As the last
name suggests, those are files from Profiles. And using "ll" command is
blinding you. If you use "ls -lR /etc/sysconfig/networking/profiles/* :

/etc/sysconfig/networking/profiles/default:
total 44
-rw-r--r--. 2 root root 271 Sep 3 22:00 hosts
-rw-r--r--. 3 root root 315 Jun 30 13:39 ifcfg-br0
-rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:1
-rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:2
-rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:3
-rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:4
-rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:5
-rw-r--r--. 3 root root 211 Jun 30 13:39 ifcfg-br0:6
-rw-r--r--. 3 root root 211 Jun 30 13:39 ifcfg-br0:7
-rw-r--r--. 3 root root 229 Sep 4 01:06 ifcfg-eth0
-rw-r--r--. 1 root root 286 Sep 4 00:56 resolv.conf

Both C5 and C6 have "network" service able to create and switch to
multiple profiles. For example, switching to profile "WiFiKuca" is done
with:

"system-config-network-cmd -p WiFiKuca -a"

In sub-directories of /etc/sysconfig/networking/profiles/ are stored
originals of your configuration, and /etc/sysconfig/network-scripts/ has
only files from current active profile.


--

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-09-2011, 04:50 PM
Nicolas Thierry-Mieg
 
Default multiple ifcfg-x locations on CentOS-6

Ljubomir Ljubojevic wrote:
> Vreme: 10/08/2011 01:10 AM, Nicolas Thierry-Mieg piše:
>> James B. Byrne wrote:
>>>
>>> $ ll /etc/sysconfig/networking/devices
>>> total 12
>>> -rw-r--r--. 2 root root 116 Oct 7 15:19 ifcfg-br0
>>> -rw-r--r--. 2 root root 238 Oct 7 15:24 ifcfg-eth0
>>> -rw-r--r--. 2 root root 117 Oct 7 15:19 ifcfg-eth1
>>
>> ^
>> look at that 2 there
>>
>>> My questions are: What are these duplicate, and
>>> identical, files doing in multiple places on my system;
>>
>> those are hard-linked, most likely the same file in both subdirs (not
>> identical files, a single file hard-linked twice)
>>
>> the /etc/sysconfig/networking/* subdirs can exist on C5 as well, I think
>> they're used by system-config-network
>>
>>
>>> and why are they evidently interfering with the normal
>>> processing of /etc/sysconfig/network-scripts through the
>>> service utility?
>>
>> on a C6 machine I have those dirs are empty, as on your C5 system. I
>> probably never used system-config-network on it. Networking through
>> /etc/init.d/network functions fine without them.
>
> Files in /sysconfig/networking/profiles/ are not hardlinks. As the last
> name suggests, those are files from Profiles. And using "ll" command is
> blinding you. If you use "ls -lR /etc/sysconfig/networking/profiles/* :

yes they are hard links, or at least thay can be. "info ls" will tell
you that the column between permissions and owner is the number of hard
links. That's the 2 in the OP's "ls -l" output that I highlighted in my
previous email.

Your own example below shows that most of your files in
networking/profiles/default are hardlinked 2 other times (3 hard links
total), most probably in networking/devices/ as well as network-scripts/ .

To confirm this try "ls -li" and compare the inode numbers.


> /etc/sysconfig/networking/profiles/default:
> total 44
> -rw-r--r--. 2 root root 271 Sep 3 22:00 hosts
> -rw-r--r--. 3 root root 315 Jun 30 13:39 ifcfg-br0
> -rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:1
> -rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:2
> -rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:3
> -rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:4
> -rw-r--r--. 3 root root 248 Jun 30 13:39 ifcfg-br0:5
> -rw-r--r--. 3 root root 211 Jun 30 13:39 ifcfg-br0:6
> -rw-r--r--. 3 root root 211 Jun 30 13:39 ifcfg-br0:7
> -rw-r--r--. 3 root root 229 Sep 4 01:06 ifcfg-eth0
> -rw-r--r--. 1 root root 286 Sep 4 00:56 resolv.conf
>
> Both C5 and C6 have "network" service able to create and switch to
> multiple profiles. For example, switching to profile "WiFiKuca" is done
> with:
>
> "system-config-network-cmd -p WiFiKuca -a"

this is not the "network service", as in what you get with "service
network stop|start|etc...." which runs /etc/init.d/network in a
predictable environment. That script knows nothing about profiles, and
doesn't care at all about /etc/sysconfig/networking/ .

your example uses system-config-network-cmd which is part of
system-config-network, which as I said uses the stuff in
/etc/sysconfig/networking/ .
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 09:26 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org