Bug 47164 - hotplug is unable to initialise eth interface
Summary: hotplug is unable to initialise eth interface
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: hotplug
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-03 18:44 UTC by Leonid Kanter
Modified: 2007-04-18 16:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-07-06 20:15:13 UTC
Embargoed:


Attachments (Terms of Use)
I rebuild rpm with this wersion of wireless patch and everything is OK (732 bytes, patch)
2001-07-04 09:43 UTC, Leonid Kanter
no flags Details | Diff

Description Leonid Kanter 2001-07-03 18:44:33 UTC
Description of Problem:

When you insert pcmcia card, eth0 interface will not be initialised.

How Reproducible:

always

Actual Results:

I replaced "exec ifup" with "exec sh -x ifup" in /etc/hotplug/net.agent
See debugging output.


[root@t440 hotplug]# sh -x /etc/hotplug/net.agent
+ . hotplug.functions
++ PATH=/bin:/sbin:/usr/sbin:/usr/bin
+++ uname -r
++ KERNEL=2.4.5-10
++ MODULE_DIR=/lib/modules/2.4.5-10
++ HOTPLUG_DIR=/etc/hotplug
++ '[' -t -o '!' -x /usr/bin/logger ']'
+++ type -p gawk
++ AWK=/bin/gawk
++ '[' /bin/gawk = '' ']'
++ MODPROBE=/sbin/modprobe
+ '[' eth0 = '' ']'
+ '[' '!' -f /var/lock/subsys/network ']'
+ WIRELESS=
+ iwconfig eth0
+ grep -q 'no wireless extensions'
eth0      no wireless extensions.

+ WIRELESS=1
+ '[' -n 1 ']'
++ ifconfig eth0
++ grep HWaddr
++ awk '{ print $5 }'
+ HWADDR=00:80:C7:C5:AF:C0
+ export HWADDR
+ /etc/pcmcia/wireless start eth0
/sbin/iwconfig eth0 nwid 100
SIOCSIWNWID: Operation not supported
/sbin/iwconfig eth0 key 00
SIOCSIWENCODE(95): Operation not supported
+ '[' -x /sbin/ifup ']'
+ '[' '' '!=' '' ']'
+ exec sh -x /sbin/ifup eth0
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ TEXTDOMAIN=initscripts
+ cd /etc/sysconfig/network-scripts
+ . network-functions
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ TEXTDOMAINDIR=/etc/locale
++ umask 022
++ export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -f /etc/sysconfig/i18n -a -z '' ']'
++ . /etc/sysconfig/i18n
+++ LANG=ru_RU.koi8r
+++ SUPPORTED=ru_RU.koi8r:ru_RU:ru
+++ SYSFONT=cyr-sun16
+++ CHARSET=koi8-r
+++ /sbin/consoletype
++ '[' ru_RU.koi8r = ja_JP.eucJP -a pty '!=' pty ']'
++ export LANG
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL=echo -en \033[60G
+++ SETCOLOR_SUCCESS=echo -en \033[1;32m
+++ SETCOLOR_FAILURE=echo -en \033[1;31m
+++ SETCOLOR_WARNING=echo -en \033[1;33m
+++ SETCOLOR_NORMAL=echo -en \033[0;39m
+++ LOGLEVEL=1
+++ PROMPT=yes
++ '[' -x /sbin/consoletype ']'
+++ consoletype
++ '[' pty = serial ']'
++ '[' color '!=' verbose ']'
++ INITLOG_ARGS=-q
+ '[' -f ../network ']'
+ . ../network
++ NETWORKING=yes
++ HOSTNAME=t440.home
++ GATEWAY=192.168.200.1
++ GATEWAYDEV=eth0
+ '[' -f ../networking/network ']'
+ need_hostname
++ hostname
++ hostname
++ hostname
+ '[' t440.home = '(none)' -o t440.home = localhost -o t440.home =
localhost.localdomain ']'
+ unset NEEDHOSTNAME
+ CONFIG=eth0
+ '[' -z eth0 ']'
+ '[' -f eth0 ']'
++ current_profile
++ '[' '' '!=' '' ']'
++ '[' '' '!=' '' ']'
++ echo default
+ CONFIG=../networking/default/eth0
+ '[' -f ../networking/default/eth0 ']'
++ current_profile
++ '[' '' '!=' '' ']'
++ '[' '' '!=' '' ']'
++ echo default
+ CONFIG=../networking/default/ifcfg-eth0
+ '[' -f ../networking/default/ifcfg-eth0 ']'
+ CONFIG=ifcfg-eth0
+ '[' -f ifcfg-eth0 ']'
+ '[' 0 '!=' 0 ']'
+ source_config
++ basename ifcfg-eth0
++ sed 's/^ifcfg-//g'
+ DEVNAME=eth0
+ basename ifcfg-eth0
+ grep '[^g]-'
+ . ifcfg-eth0
++ DEVICE=eth0
++ IPADDR=192.168.200.3
++ NETMASK=255.255.255.0
++ ONBOOT=no
++ BOOTPROTO=
++ IPXNETNUM_802_2=
++ IPXPRIMARY_802_2=no
++ IPXACTIVE_802_2=no
++ IPXNETNUM_802_3=
++ IPXPRIMARY_802_3=no
++ IPXACTIVE_802_3=no
++ IPXNETNUM_ETHERII=
++ IPXPRIMARY_ETHERII=no
++ IPXACTIVE_ETHERII=no
++ IPXNETNUM_SNAP=
++ IPXPRIMARY_SNAP=no
++ IPXACTIVE_SNAP=no
+ '[' foo = fooboot -a no = no -o no = NO ']'
++ echo eth0
++ sed 's/[0-9]*$//'
+ DEVICETYPE=eth
++ echo eth0
++ sed 's/:.*//g'
+ REALDEVICE=eth0
+ echo eth0
+ grep -q :
+ ISALIAS=no
+ '[' '' = yes ']'
+ '[' '' = bootp -o '' = dhcp ']'
+ '[' -x /sbin/ifup-pre-local ']'
+ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup-eth
+ '[' -x /etc/sysconfig/network-scripts/ifup-eth ']'
+ LC_ALL=
+ LANG=
+ ip -o link
+ grep -q eth0
+ '[' 0 = 1 ']'
+ '[' -n 00:80:C7:C5:AF:C0 ']'
++ LC_ALL=
++ LANG=
++ ip -o link show eth0
++ sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'
+ FOUNDMACADDR=00:80:c7:c5:af:c0
+ '[' 00:80:c7:c5:af:c0 '!=' 00:80:C7:C5:AF:C0 ']'
+ echo 'Device eth0 has different MAC address than expected, ignoring.'
Device eth0 has different MAC address than expected, ignoring.
+ exit 1


Make MAC address in net.agent lowercase like in /sbin/ifup and everything
will be OK. Use /sbin/ip output instead of ifconfig.

Comment 1 Leonid Kanter 2001-07-04 09:43:03 UTC
Created attachment 22647 [details]
I rebuild rpm with this wersion of wireless patch and everything is OK

Comment 2 Gerald Teschl 2001-07-06 17:55:40 UTC
Just run into the same problem and I suggest to use:

--- net.agent.orig      Fri Jul  6 19:57:22 2001
+++ net.agent   Fri Jul  6 19:58:05 2001
@@ -35,7 +35,9 @@
     # we can't do much here without distro-specific knowledge
     # such as whether/how to invoke DHCP, set up bridging, etc.
     WIRELESS=
-    iwconfig $INTERFACE | grep -q "no wireless extensions" || WIRELESS=1
+    if [ -x iwconfig ]; then
+       iwconfig $INTERFACE | grep -q "no wireless extensions" || WIRELESS=1
+    fi
 
     if [ -n "$WIRELESS" ]; then
         HWADDR=`ifconfig $INTERFACE | grep HWaddr | awk '{ print $5 }'`

Comment 3 Trond Eivind Glomsrxd 2001-07-06 20:15:10 UTC
OK... I'll ned to make the case match


Comment 4 Bill Nottingham 2001-07-09 04:45:03 UTC
fixed in hotplug-2001_04_24-5; the case isn't really relevant, as the HWADDR
there is not being used for what initscripts uses it for.


Note You need to log in before you can comment on or make changes to this bug.