Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75978 - dhcpcd time out on cable unplug is too long
Summary: dhcpcd time out on cable unplug is too long
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-28 20:22 UTC by Mathieu Jobin
Modified: 2004-12-29 11:24 UTC (History)
0 users

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 Mathieu Jobin 2004-12-28 20:22:40 UTC
like many peoples, I placed net.eth0 in my rc default
but on my laptop, it is not the best, because the cable is not plug in all the time.

I try removing it and doing the connection by hand.. but there is nothing as much annoying.

anyway,... when establishing network connection, the script does not check if the cable is connected or not and dhcpcd handle it really bad.

so I modify the script to do the check... it basically now have a 5 seconds time out, instead of something like 30-60 secs

change starting at line 113

____________________________

            ebegin "Bringing ${IFACE} up via DHCP"
            ifconfig ${IFACE} up
            waitingsec=3 # IFACE_WAITING_SEC ?
            R=`iface_running ${IFACE}`
            while [ $waitingsec -gt 0 -a "$R" != "0" ]
            do
                sleep 1
                waitingsec=`expr $waitingsec - 1`
                R=`iface_running ${IFACE}`
            done
            R=`iface_running ${IFACE}`
            if [ "$R" == "0" ]
            then
                /sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE}
                retval=$?
            else
                retval=6969
            fi
            eend $retval
            if [[ $retval == 0 ]]; then
                # DHCP succeeded, show address retrieved

_________________________

this is probably not the best way to fix, it but I like it better.

now, how I have to do left is to trigger dhcpcd when the cable get inserted....
but how ?
Comment 1 SpanKY gentoo-dev 2004-12-29 11:24:25 UTC
set the timeout yourself in /etc/conf.d/net