update, added print of n/a

This commit is contained in:
inxi-svn 2011-04-25 05:33:52 +00:00
parent 3aa7c6ee28
commit 82b3c0728e

20
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 1.4.24-b1
#### version: 1.4.24-b2
#### Date: April 20 2011
########################################################################
#### SPECIAL THANKS
@ -4904,11 +4904,23 @@ print_networking_data()
print_network_advanced_data()
{
eval $LOGFS
local network_data=''
local network_data='' eth_id='N/A' duplex='N/A' mac_id='N/A' speed='N/A'
if [[ $B_SHOW_ADVANCED_NETWORK == 'true' ]];then
network_data="${C1}Net:${C2} ${a_network_working[5]} ${C1}Speed:${C2} ${a_network_working[6]}"
network_data="$network_data ${C1}Duplex:${C2} ${a_network_working[7]} ${C1}Mac:${C2} ${a_network_working[8]}"
if [[ -n ${a_network_working[5]} ]];then
eth_id=${a_network_working[5]}
fi
if [[ -n ${a_network_working[6]} ]];then
speed=${a_network_working[6]}
fi
if [[ -n ${a_network_working[7]} ]];then
duplex=${a_network_working[7]}
fi
if [[ -n ${a_network_working[8]} ]];then
mac_id=${a_network_working[8]}
fi
network_data="${C1}Net:${C2} $eth_id ${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"
fi