Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3023 - /etc/init.d/dhcp script hardcoded to eth0
Summary: /etc/init.d/dhcp script hardcoded to eth0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Lowest trivial (vote)
Assignee: Brandon Low (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-25 10:29 UTC by Scott Van Wart
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

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


Attachments
Fixups for dhcp-3.0-r2 (dhcp.patch,1.74 KB, patch)
2002-06-24 10:57 UTC, Jan Bruvoll
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Van Wart 2002-05-25 10:29:07 UTC
My network is set up such that dhcpd responds on the eth1 interface.  So when the server 
wouldn't work, I checked the output and found that dhcpd was listening only on eth0.  Suggest 
removing the reference to eth0 in /etc/init.d/dhcp on the daemon start line (let dhcpd probe 
interfaces itself) or using an /etc/conf.d/dhcp file to specify desired interfaces.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-25 17:02:56 UTC
I dont have a /etc/init.d/dhcp ... from what package ?
Comment 2 Scott Van Wart 2002-05-25 23:12:19 UTC
From net-misc/dhcp
Comment 3 Thomas Raschbacher gentoo-dev 2002-05-26 15:14:13 UTC
add /etc/conf.d/dhcp:
# DHCP Daemon options (e.g. interface,..)
DHCP_OPTS=eth1

then patch /etc/init.d/dhcp like that:
21c21
<     start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd -- ${DHCP_OPTS}
---
>     start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd -- eth0
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-02 16:34:55 UTC
Can it work on multiple interfaces ?  Something like:

for x in ${DHCPD_IFACE}
do
    start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd -- ${x}
done
Comment 5 Jan Bruvoll 2002-06-24 10:57:08 UTC
Created attachment 1751 [details, diff]
Fixups for dhcp-3.0-r2

Dear all,

I took the liberty of cleaning up a few small things in the dhcp ebuild.
Firstly, I added touching /var/lib/dhcp/dhcpd.leases - dhcp complains about the
missing leases file at startup.

Secondly, conf.d/dhcp was bungled - there was a newline too many, giving an
error at startup.

Thirdly, I added a variable for other runtime options than interfaces, so that
these can be cleanly separated.

Lastly, shouldn't init.d/dhcp and conf.d/dhcp rather be named */dhcpd? That's
the naming pattern for all the other daemons I've seen so far...

Best regards,
Jan
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-24 12:47:57 UTC
Will some dev who use *and* know dhcp fix this ?
Comment 7 Brandon Low (RETIRED) gentoo-dev 2002-09-02 21:45:20 UTC
looks real good there, I'll apply.