this bug is against the default network script /etc/init.d/net.eth0. if i have the following in my /etc/conf.d/net: iface_eth1="dhcp" gateway="eth1/192.168.0.1" at home, i get a DHCP address and use router 192.168.0.1. however, if i'm at the coffee shop, i get a DHCP address, but 192.168.0.1 doesn't exist. so /sbin/dhcpcd is successful, but the "Setting default gateway" section in /etc/init.d/net.eth0 fails (since the /sbin/route command fails (since there is no 192.168.0.1)). it takes down the interface, but doesn't check to see if it was a dhcp interface. if it _was_ a DHCP interface, it should kill dhcpcd and remove the /var/run/dhcpcd...pid file. the problem in it not killing dhcpcd is that when you try and bring up the interface again, you get a "/var/run/dhcpcd...pid file is present"-type of error.
Edit net.eth0, and change the following section: ------------------------------------------------------------------------ if [ -n "${gateway}" ] && [ "${gateway%/*}" = "${IFACE}" ] then ebegin " Setting default gateway" /sbin/route add default gw ${gateway#*/} dev ${gateway%/*} \ netmask 0.0.0.0 metric 1 >/dev/null || { local error=$? ifconfig ${IFACE} down &>/dev/null eend ${error} "Failed to bring ${IFACE} up" return ${error} } eend 0 fi ------------------------------------------------------------------------- To: ------------------------------------------------------------------------- if [ -n "${gateway}" ] && [ "${gateway%/*}" = "${IFACE}" ] then ebegin " Setting default gateway" /sbin/route add default gw ${gateway#*/} dev ${gateway%/*} \ netmask 0.0.0.0 metric 1 >/dev/null || { local error=$? ifconfig ${IFACE} down &>/dev/null eend ${error} "Failed to bring ${IFACE} up" stop return ${error} } eend 0 fi ------------------------------------------------------------------------- Note the 'stop' before the 'return ${error}'. See if this fixes it and please reply.
this change works just fine.
Fixed on CVS, thanks.
is it fine for me to close this now? (or is the developer supposed to close it?)
You can close it if its fixed.
this works fine for me. closing.