From 7341973effc46c194be8b17439c87488f0037647 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 25 Apr 2011 06:58:31 +0000 Subject: [PATCH] more variable fixes --- inxi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/inxi b/inxi index 0931586..4c06539 100755 --- a/inxi +++ b/inxi @@ -3036,7 +3036,7 @@ get_network_advanced_data() { eval $LOGFS local a_network_adv_working='' card_if='' working_path='' - local eth_id='' speed='' duplex='' mac_id='' oper_state='' + local if_id='' speed='' duplex='' mac_id='' oper_state='' for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ )) do @@ -3045,12 +3045,12 @@ get_network_advanced_data() 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 ) - eth_id=$card_if + if_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_if=$( ls $working_path 2>/dev/null | grep 'net:' ) - eth_id=$( cut -d ':' -f 2 <<< "$card_if" ) + if_id=$( cut -d ':' -f 2 <<< "$card_if" ) working_path=$working_path/$card_if fi @@ -3069,7 +3069,7 @@ get_network_advanced_data() fi fi - A_NETWORK_DATA[i]=${a_network_adv_working[0]}","${a_network_adv_working[1]}","${a_network_adv_working[2]}","${a_network_adv_working[3]}","${a_network_adv_working[4]}","$eth_id","$oper_state","$speed","$duplex","$mac_id + A_NETWORK_DATA[i]=${a_network_adv_working[0]}","${a_network_adv_working[1]}","${a_network_adv_working[2]}","${a_network_adv_working[3]}","${a_network_adv_working[4]}","$if_id","$oper_state","$speed","$duplex","$mac_id IFS="$ORIGINAL_IFS" done @@ -4908,11 +4908,11 @@ print_networking_data() print_network_advanced_data() { eval $LOGFS - local network_data='' eth_id='N/A' duplex='N/A' mac_id='N/A' speed='N/A' oper_state='N/A' + local network_data='' if_id='N/A' duplex='N/A' mac_id='N/A' speed='N/A' oper_state='N/A' if [[ $B_SHOW_ADVANCED_NETWORK == 'true' ]];then if [[ -n ${a_network_working[5]} ]];then - eth_id=${a_network_working[5]} + if_id=${a_network_working[5]} fi if [[ -n ${a_network_working[6]} ]];then oper_state=${a_network_working[6]} @@ -4926,7 +4926,7 @@ print_network_advanced_data() if [[ -n ${a_network_working[9]} ]];then mac_id=${a_network_working[9]} fi - network_data="${C1}IF:${C2} $eth_id ${C1}State:${C2} $oper_state ${C1}Speed:${C2} $speed" + network_data="${C1}IF:${C2} $if_id ${C1}State:${C2} $oper_state ${C1}Speed:${C2} $speed" network_data="$network_data ${C1}Duplex:${C2} $duplex ${C1}Mac:${C2} $mac_id" network_data=$( create_print_line " " "$network_data" ) print_screen_output "$network_data"