Description of problem: It would be nice to be able to use named ethernet interfaces during the bootup process. Currently, nameif isn't called to name interfaces after their modules are loaded. This patch calls nameif after loading each network module. --- network-functions.~2~ 2003-03-06 10:45:59.000000000 -0600 +++ network-functions 2003-03-06 10:48:08.000000000 -0600 @@ -93,7 +93,8 @@ return 2 fi modprobe $1 > /dev/null 2>&1 || return 1 + [ -f /etc/mactab ] && /sbin/nameif LC_ALL= LANG= ip -o link | grep -q $1 return $? } Version-Release number of selected component (if applicable): initscripts-7.10-1 or earlier
Hm, if we do this, will have to look into how to avoid the 'wireless' problem.
We have an alternative to the above patch wherein we call nameif on an individual basis instead of N times for N interfaces. The interfaces that do not exist yet will blow errors when done with the above method. We had the same problem and I made a quick page discussing it at www.pcxperience.org/nameif/ This patch is against RH 9.0 but can be easily changed for other versions. /etc/sysconfig/network-scripts/network-functions --- network-functions.orig 2003-02-10 20:34:18.000000000 -0600 +++ network-functions 2003-05-06 11:20:26.000000000 -0500 @@ -93,6 +93,9 @@ return 2 fi modprobe $1 > /dev/null 2>&1 || return 1 + if [ -n "${HWADDR}" ]; then + /sbin/nameif "$1" "${HWADDR}" + fi LC_ALL= LANG= ip -o link | grep -q $1 return $? } to make sure that HWADDR is available we also patched /etc/init.d/network --- network.orig 2003-02-03 20:19:20.000000000 -0600 +++ network 2003-05-06 11:18:03.000000000 -0500 @@ -107,6 +107,7 @@ continue fi if LANG=C egrep -L "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then + eval $(fgrep "HWADDR" ifcfg-$i) # this loads the module, to preserve ordering is_available $i continue OPTIONALLY you can take out the other spot where this was trying to be done in /sbin/ifup --- ifup.orig 2003-03-12 19:16:46.000000000 -0600 +++ ifup 2003-05-06 11:18:48.000000000 -0500 @@ -152,16 +152,6 @@ exit 0 fi } -if [ -n "${HWADDR}" ]; then - FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} | \ - sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'` - if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then - /sbin/nameif "${REALDEVICE}" "${HWADDR}" || { - echo $"Device ${DEVICE} has different MAC address than expected, ignoring." - exit 1 - } - fi -fi # is the device wireless? If so, configure wireless device specifics is_wireless_device ${DEVICE} && . ./ifup-wireless
which is the bug state? initscripts-7.22-1 doesn't has any change
There are various other places that don't really handle arbitrary device names correctly that need fixed first.
Various things added in 7.26-1. Let's see what breaks.
I filed bug 100622 for interfaces that are brought up by hotplug.