Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38450 - net.eth0 init script takes too long when no cable is plugged in
Summary: net.eth0 init script takes too long when no cable is plugged in
Status: RESOLVED WONTFIX
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: 38538
  Show dependency tree
 
Reported: 2004-01-16 14:24 UTC by Keith Lea
Modified: 2004-03-06 13:29 UTC (History)
1 user (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 Keith Lea 2004-01-16 14:24:15 UTC
It takes at least a minute for the net.eth0 init script to try to bring eth0 up, before it gives up.

This is not a duplicate of 12382, because that was marked fixed, and this bug isn't fixed. I have binutils-2.14.90.0.7-r3 and baselayout-1.8.6.12-r3.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2004-01-16 18:46:33 UTC
are you using dhcp ?
Comment 2 Keith Lea 2004-01-16 21:20:26 UTC
Yes.
Comment 3 SpanKY gentoo-dev 2004-01-17 02:45:50 UTC
then set the timeout option of dhcpcd to be lower
Comment 4 Keith Lea 2004-01-17 09:45:38 UTC
This bug is not invalid. It is a problem with the Gentoo startup scripts, and if you won't fix it, then mark it WONTFIX, but it isn't invalid.

I don't want my DHCP timeout to be lower in general, I just want the net.eth0 init script to time out faster. Other Linux distributions use a smaller timeout in the init scripts than when calling dhcpcd manually, and it makes sense - you can't cancel it.
Comment 5 SpanKY gentoo-dev 2004-01-17 12:08:16 UTC
no, what you're talking about is trying to make the init scripts hold your hand a little bit more

with dhcp, it's up to you to specify the paramters (including timeout)
some people actually need that 60 seconds (or even more) to get their dhcp information so killing it in a short time in the init script is just wrong

if you want a smaller timeout then add the paramter to dhcpcd_ethX and that's the end of it
Comment 6 Daniel Gryniewicz (RETIRED) gentoo-dev 2004-03-06 13:29:33 UTC
Here's what I did to solve this:

Add this to setup_env():
    if mii-diag -s ${iface} 2>/dev/null >/dev/null; then
        link_IFACE="yes"
    else
        link_IFACE="no"
    fi

And add this to iface_start():
            if [ "${link_IFACE}" == "yes" ]
            then
                /sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE} >/dev/null || {
                    retval=$?
                    eend ${retval} "Failed to bring ${IFACE} up"
                    return ${retval}
                }
            fi

This will not attempt to bring up the dhcp if there's no link on the interface.  Works great for me.