From 24678415554c72f531e294ecf0fe2fd5b07149a3 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 25 Apr 2011 06:59:24 +0000 Subject: [PATCH] and more --- inxi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inxi b/inxi index 4c06539..131bbcc 100755 --- a/inxi +++ b/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