Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42973 - Recommended changes to net.eth0
Summary: Recommended changes to net.eth0
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:
 
Reported: 2004-02-26 05:07 UTC by Sean Higgins
Modified: 2004-05-23 07:04 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 Sean Higgins 2004-02-26 05:07:44 UTC
I would like to suggest the following changes to net.eth0: 

61,80c61,62
<               #
<               # The interface should be started using dhcpcd.
<               #
<               # First, get the PID of the dhcpcd process, if started.
<               #
<               DHCP_START=`ps ax | grep "/sbin/dhcpcd.*${IFACE}" | grep -v grep | awk '{ print $1 }'`
<               #
<               # If the interface is already started with dhcpcd, then
<               # at least put the PID in the proper file so this utility
<               # can stop it.
<               #
<               if [ "X${DHCP_START}" != "X" ]
<               then
<                 echo "${DHCP_START}" > /var/run/dhcpd-${IFACE}.pid
<               fi
<               #
<               # If the interface is not up, or up but not running dhcpcd,
<               # then run dhcpcd for the interface.
<               #
<               if [ "${status_IFACE}" != "up" -o "X${DHCP_START}" = "X" ]
---
>               # Check that eth0 was not brough up by the kernel ...
>               if [ "${status_IFACE}" ] 

As documented in the comments, these changes correct some issues that I have had with net.eth0, because net.eth0 is sometimes started by the kernel and since I change my configuration at boot time, when the kernel starts net.eth0, the kernel uses the last known configuration.

Anyway, what I have done is really two things:

First, if dhcp is required and dhcp is started by the kernel, then ensure the PID of the dhcp process is in a place where it can be killed. This solved the problem of running "net.eth0 stop" and dhcp not being stopped.

Second, if dhcp is required and dhcp was not started(even if the interface is already up), start dhcp for the interface. 

Sean

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Sean Higgins 2004-05-23 07:04:34 UTC
This issue was resolved in the latest version of baselayout.  Now, all network interfaces are stopped during boot before the boot process switches to default.