--- /etc/init.d/net.eth0 2003-09-14 16:29:43.000000000 +0200 +++ net.eth0 2003-12-13 17:56:18.000000000 +0100 @@ -29,6 +29,7 @@ # No reason to check these multiple times in the file iface="${1/\./_}" iface_IFACE="$(eval echo \$\{iface_${iface}\})" + media_IFACE="$(eval echo \$\{media_${iface}\})" dhcpcd_IFACE="$(eval echo \$\{dhcpcd_${iface}\})" inet6_IFACE="$(eval echo \$\{inet6_${iface}\})" alias_IFACE="$(eval echo \$\{alias_${iface}\})" @@ -44,6 +45,26 @@ local IFACE="${1}" ebegin "Bringing ${IFACE} up" + + if [ -n "${media_IFACE}" ] + then + if [ "${media_IFACE}" = "auto" ] + then + /sbin/mii-tool --restart ${IFACE} >/dev/null || { + retval=$? + eend ${retval} "Failed to restart autonegotiation on ${IFACE}" + return ${retval} + } + else + /sbin/mii-tool --force=${media_IFACE} ${IFACE} >/dev/null || { + retval=$? + eend ${retval} "Failed to force autonegotiation on ${IFACE} to ${media_IFACE}" + return ${retval} + } + fi + eend 0 + fi + if [ "${iface_IFACE}" != "dhcp" ] then /sbin/ifconfig ${IFACE} ${iface_IFACE} >/dev/null || {