Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Detection of network-cable




> -----Original Message-----
> From: vdr-bounce@linuxtv.org [mailto:vdr-bounce@linuxtv.org]On Behalf Of
> Gavin Hamill
> Sent: Monday, March 17, 2003 12:17 AM
> To: vdr@linuxtv.org
> Subject: [vdr] Re: Detection of network-cable
>
>
> Don't overlook some simple 'bash' in conjunction with the output from
> 'mii-tool' :)
>
> $ mii-tool eth0
> eth0: negotiated 100baseTx-FD, link ok
>
> Simple 'grep'ping of the output for 'ok' would allow for a very fast
> startup without the need for any 'timeout' values or background daemons.
>
> Cheers,
> gdh


There is only one little problem:
in the most cases it will work, but if you have special network devices, it
only gives an error...

In my server, it works, but on my laptop with its Orinoco wlan-card it only
gives a 'Operation not supported'. In this cases a short timeout (i have set
5 seconds to dhcpcd), is the better solution, and 5 seconds are not the
world ... the default for the dhcpcd on my vdr box was something like 90
seconds, so it takes over 130 seconds to boot the machine (against 38-43
seconds with no network module loaded or network link available).

But perhaps it would be possible to combine a call of 'mii-tool' with the
timeout of the dhcpcd. So it would be possible, oly to load the dhcp client
only, if the mii-tool says, that there is a network link or if it returns an
error. And the timeout is for the case, that mii-tool was not able to detect
the status of the network link ...

Oliver



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index