return 1
fi
+
# work around Cisco portfast implementation not being fast
- /bin/ip link set dev ${i} up
if [ "${spantree}" != "" ]
then
msg -n "Trying DHCP on ${i} interface"
- /sbin/udhcpc -i ${INTERFACE} -n -s /etc/ifup.udhcp.sh \
+ /sbin/udhcpc -i ${INTERFACE} -T 5 -n -s /etc/ifup.udhcp.sh \
-p /tmp/dhcp.${INTERFACE}.pid >> /tmp/stdout.log 2>> /tmp/stderr.log
if [ "$?" = 0 ]
NET_DEVICE_COUNT=`expr ${NET_DEVICE_COUNT} + 1`
+ /bin/ip link set dev ${i} up
+ /sbin/ifconfig ${i} up
+
+ msg "Sleeping for 15 seconds for link to come up on ${i}"
+ sleep 15
+
msg -n "Checking link status for ${i}"
- /bin/mii-diag -s ${i} >> /tmp/stdout.log 2>> /tmp/stderr.log
+ LINK=`/usr/bin/ethtool ${i} | grep Link | awk '{print $3}' 2> /dev/null`
- if [ "$?" != "0" ];
+ if [ "${LINK}" != "yes" ];
then
fail_msg
else