mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
and more
This commit is contained in:
parent
7341973eff
commit
2467841555
16
inxi
16
inxi
|
@ -3035,7 +3035,7 @@ get_networking_data()
|
|||
get_network_advanced_data()
|
||||
{
|
||||
eval $LOGFS
|
||||
local a_network_adv_working='' card_if='' working_path=''
|
||||
local a_network_adv_working='' if_path='' working_path=''
|
||||
local if_id='' speed='' duplex='' mac_id='' oper_state=''
|
||||
|
||||
for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ ))
|
||||
|
@ -3044,17 +3044,17 @@ get_network_advanced_data()
|
|||
a_network_adv_working=( ${A_NETWORK_DATA[i]} )
|
||||
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
|
||||
if [[ -e $working_path/net ]];then
|
||||
card_if=$( ls $working_path/net 2>/dev/null )
|
||||
if_id=$card_if
|
||||
working_path=$working_path/net/$card_if
|
||||
if_path=$( ls $working_path/net 2>/dev/null )
|
||||
if_id=$if_path
|
||||
working_path=$working_path/net/$if_path
|
||||
# 2.6.32 debian lenny kernel shows not: /net/eth0 but /net:eth0
|
||||
else
|
||||
card_if=$( ls $working_path 2>/dev/null | grep 'net:' )
|
||||
if_id=$( cut -d ':' -f 2 <<< "$card_if" )
|
||||
working_path=$working_path/$card_if
|
||||
if_path=$( ls $working_path 2>/dev/null | grep 'net:' )
|
||||
if_id=$( cut -d ':' -f 2 <<< "$if_path" )
|
||||
working_path=$working_path/$if_path
|
||||
fi
|
||||
|
||||
if [[ -n $card_if ]];then
|
||||
if [[ -n $if_path ]];then
|
||||
if [[ -f $working_path/speed ]];then
|
||||
speed=$( cat $working_path/speed )
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue