[MBT] new ticket for pkg rc-scripts "Awfully slow network start with broken link cable"

bugs at pld-linux.org bugs at pld-linux.org
Thu Jul 8 10:13:18 CEST 2004


Date: 2004-07-08 10:13:17+02	Author: Jacek Misiurewicz (mjacek) <jmisiure at elka.pw.edu.pl> 
Title:         Awfully slow network start with broken link cable
Ticket ID:     #928
Ticket URL:    http://bugs.pld-linux.org/?bug=928
Package:       rc-scripts-PLD 2.0:0.4.0.13-1
Distribution:  
Category:      feature request
Current state: opened
Text:

When PLD starts networking and the network cable is not connected, I have a looong delay (probably in dhcp client). 



The simple solution is to use mii-tool to detect "link failed" and exit the /sbin/ifup script early:





diff -c /sbin/ifup.org /sbin/ifup

*** /sbin/ifup.org	2004-05-02 20:50:35.000000000 +0200

--- /sbin/ifup	2004-07-08 10:06:10.211016776 +0200

***************

*** 75,80 ****

--- 75,89 ----

      exit 1

  fi

  

+ if [ "$DEVICETYPE" = "eth" -a -x /sbin/mii-tool ]; then

+ #    echo checking  device ${DEVICE} 

+     if (/sbin/mii-tool ${DEVICE} | grep  -q "no link"); then

+ 	nls "No link - check cable at %s" ${DEVICE}

+ 	exit 1

+     fi

+ fi

+ 

+ 

  if is_yes "$SLAVE" && [ -n "$MASTER" -a -x /sbin/ifenslave ]; then

      RFLAG="" && is_yes "${RECIEVE-ONLY}" && RFLAG="-r"

  









More information about the pld-bugs mailing list