Merge ~kissiel/plainbox-provider-checkbox:use-mii-tool-in-network into plainbox-provider-checkbox:master
Status: | Merged |
---|---|
Approved by: | Maciej Kisielewski |
Approved revision: | 7777b1e1abec3f0e17330582f9b1c3f7faae1536 |
Merged at revision: | 582bcf4c69141532e8e7b25f162215b393d442a5 |
Proposed branch: | ~kissiel/plainbox-provider-checkbox:use-mii-tool-in-network |
Merge into: | plainbox-provider-checkbox:master |
Diff against target: |
46 lines (+12/-15) 1 file modified
bin/network (+12/-15) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Larson | Approve | ||
Review via email: mp+314996@code.launchpad.net |
Description of the change
On some systems, ethtool returns such output:
>>>
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
<<<
previous version of the `network` script parsed for any number followed by
the 'baseT' string and picked the largest one found as max_speed. Which for
this system is wrong.
This patch makes the script parse output of mii-tool and look for
'capabilities' line. It parses modes only from that line. In case of that
system it returns 100.
nice, +1