Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1318 - net scripts don't properly release dhcp lease on interface shutdown
Summary: net scripts don't properly release dhcp lease on interface shutdown
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1319
  Show dependency tree
 
Reported: 2002-03-23 10:50 UTC by Jim Nutt
Modified: 2003-02-04 19:42 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 Jim Nutt 2002-03-23 10:50:53 UTC
When a network interface controlled by dhcp is shutdown, the dhcp lease is not
being released and dhcpcd is not being killed. This causes problems with pcmcia
and hotplug interfaces as they are not completely shutdown on eject.
Comment 1 Jim Nutt 2002-03-23 11:02:17 UTC
Can't seem to attach the file with the updated /etc/init.d/net.eth0. Here is the
pertinent section:

        /sbin/ifconfig ${IFACE} down &>/dev/null
        if [ "$(eval echo \$\{iface_${IFACE}\})" == "dhcp" ]
        then
                /sbin/dhcpcd -k ${IFACE} &>/dev/null 
        fi
        eend 0

It goes after the alias shutdown code in the stop() section.
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2002-03-23 12:11:46 UTC
It looks like this fix is (sorta) already on our internal CVS.  The only 
difference is that our version doesn't using ifconfig to bring the interface 
down if it's dhcp (the first line in your script snippet is not executed).  Is 
this correct or does the ifconfig line need to execute either way?
Comment 3 Jim Nutt 2002-03-23 12:14:53 UTC
ifconfig down does need to be execute in both cases. If you don't do it before
the dhcpcd -k, the dhcpcd -k fails..

Comment 4 Daniel Robbins (RETIRED) gentoo-dev 2002-03-23 12:35:10 UTC
Fixed in baselayout-1.7.5.  Thanks! :)