(E-Mail Removed) (Jonathan Taub) said:
>I managed to get it.
>I've changed the ifcfg-eth0 file residing under
>/etc/sysconfig/networking/profiles/default.
>All other files don't change anything.
>
>This is strange since in the /etc/rc.d/init.d/network file the system
>scans for interfaces inside the /etc/sysconfig/network-scripts
>directory.
This comes from the need_config() function defined in the
/etc/sysconfig/network-scripts/network-functions (and called by
/sbin/ifup).
need_config ()
{
CURRENT_PROFILE=${CURRENT_PROFILE:-default}
CURRENT_PROFILE=${CURRENT_PROFILE##*/}
CONFIG=../networking/profiles/$CURRENT_PROFILE/ifcfg-${1}
[ -f "${CONFIG}" ] && return || CONFIG=../networking/profiles/$CURRENT_PROFILE/${1}
[ -f "${CONFIG}" ] && return || CONFIG=../networking/default/ifcfg-${1}
[ -f "${CONFIG}" ] && return || CONFIG=../networking/default/${1}
[ -f "${CONFIG}" ] && return || CONFIG="ifcfg-${1}"
[ -f "${CONFIG}" ] && return || CONFIG="${1}"
}
So, if CURRENT_PROFILE is not defined (the most usual case), the
CURRENT_PROFILE is set to "default". Then, whatever value CURRENT_PROFILE
has, any possible path prefix is removed from it (so, from the start of
string until the last /-character, inclusive, is removed).
Then, CONFIG gets the first value which matches a file name, from the
list of
.../networking/profiles/$CURRENT_PROFILE/ifcfg-${1}
.../networking/profiles/$CURRENT_PROFILE/${1}
.../networking/profiles/default/ifcfg-${1}
.../networking/profiles/default/${1}
ifcfg-${1}
${1}
where the current directory when this is executed is
/etc/sysconfig/network-scripts, and ${1} contains the name of the
interface.
So, if the first one exists (as it usually does), the others are not
used. Failing that, the profiles/default entry definitely should
exist.
The /etc/sysconfig/network-scripts -entries apparently exist just
for compatibility reasons; the networking/profiles -entries being
the current implementation.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)