Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44013 - /etc/init.d/net.eth0 checks interface status
Summary: /etc/init.d/net.eth0 checks interface status
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 43969
  Show dependency tree
 
Reported: 2004-03-08 01:34 UTC by Andreas Jellinghaus
Modified: 2004-05-05 20:53 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jellinghaus 2004-03-08 01:34:56 UTC
that is a stupid idea and conflicts with ifplugd.
ifplugd takes the interface up, so it can get 
the link status.

now if ifplugd notices a new link, it starts the action
script which starts net.eth0 start which should start dhcpcd.
but it does not, as the net.eth0 script sees the interface up
and decides not to start dhcpcd. that is a bad heuristic that
is not working in this case. If you are worried about starting
dhcpcd twice, then it might be better to check the pid file of
dhcpcd or simply try to kill it (dhcpcd eth0 -k).

Reproducible: Always
Steps to Reproduce:
1. configure dhcp on eth0
2. emerge ifplugd
3. start ifplugd, disable automatic
start of net.eth0. shutdown dhcpcd if there is one on eth0,
disconnect the network cable.
4. wait 20 seconds
5. insert the network cable. the syslog will show that
   ifplug.action was started, which will start /etc/init.d/net.eth0

Actual Results:  
no dhcpcd on eth0 

Expected Results:  
dhcpcd should run on eth0
Comment 1 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2004-03-08 02:07:17 UTC
Relates to #44013
Comment 2 Radek Podgorny 2004-03-08 02:52:17 UTC
This is #44013 :-)
Comment 3 Mark Jonas 2004-04-22 05:50:02 UTC
I'ld like to propose the following solution to the problem which works just fine for me (saw something similar in a different bug report I'm not able to find any more):

init.d/net.eth0,v 1.37 before:
status_IFACE="$(ifconfig ${1} 2>${devnull} | gawk '$1 == "UP" {print "up"}')"

init.d/net.eth0,v 1.37 after:
status_IFACE="$(ifconfig ${1} 2>${devnull} | gawk '/addr:/{a=1}/ UP /{ if (a == 1) print "up" }')"

With this patch an interface is only considered to be up if ifconfig reports UP and an address.

Please note that Bug 34484 reports the very same problem.
Comment 4 Mark Jonas 2004-04-27 01:32:59 UTC
I found the bug again I was referencing to. It is Bug 28362 and it is the very same problem.
Comment 5 Guilherme Barile 2004-05-04 08:10:41 UTC
Bug 34484 has a fix for this.
Comment 6 SpanKY gentoo-dev 2004-05-05 20:53:55 UTC
this has been fixed