Network card connection state
Does anyone know where the driver for the realtek cards would put the connection status of the cable? What I would like to do is modify the startup script so that DHCP is not trying to aquire an address if the cable is not hooked up. If I am using wireless, or in a location that I do not have/need network access, I do not want to wait for DHCP to decide that it won't get a response.
Thanks, Eric |
We do not mess with startup scripts, we add and remove services or devices using the appropriate tools. i.e. ifconfig eth0 down etc. etc.....
nz |
You should be able to use mii-tool to determine this. This SHOULD work:
Code:
if [ `/sbin/mii-tool eth0 | grep -ci 'link up'` -eq 0 ] |
Thank you very much
Eric |
All times are GMT -5. The time now is 06:54 PM. |