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.
I dont have a /etc/init.d/dhcp ... from what package ?
From net-misc/dhcp
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
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
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
Will some dev who use *and* know dhcp fix this ?
looks real good there, I'll apply.