diff --git a/inxi b/inxi index 777e9fe..0931586 100755 --- a/inxi +++ b/inxi @@ -3035,7 +3035,7 @@ get_networking_data() get_network_advanced_data() { eval $LOGFS - local a_network_adv_working='' card_port='' working_path='' + local a_network_adv_working='' card_if='' working_path='' local eth_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_port=$( ls $working_path/net 2>/dev/null ) - eth_id=$card_port - working_path=$working_path/net/$card_port + card_if=$( ls $working_path/net 2>/dev/null ) + eth_id=$card_if + working_path=$working_path/net/$card_if # 2.6.32 debian lenny kernel shows not: /net/eth0 but /net:eth0 else - card_port=$( ls $working_path 2>/dev/null | grep 'net:' ) - eth_id=$( cut -d ':' -f 2 <<< "$card_port" ) - working_path=$working_path/$card_port + card_if=$( ls $working_path 2>/dev/null | grep 'net:' ) + eth_id=$( cut -d ':' -f 2 <<< "$card_if" ) + working_path=$working_path/$card_if fi - if [[ -n $card_port ]];then + if [[ -n $card_if ]];then if [[ -f $working_path/speed ]];then speed=$( cat $working_path/speed ) fi