mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
a few more info items, tweaked output
This commit is contained in:
parent
a08f40b267
commit
d27870e890
24
inxi
24
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.4.24-b2
|
#### version: 1.4.24-b3
|
||||||
#### Date: April 20 2011
|
#### Date: April 20 2011
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -3035,7 +3035,7 @@ get_network_advanced_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local a_network_adv_working='' card_port='' working_path=''
|
local a_network_adv_working='' card_port='' working_path=''
|
||||||
local eth_id='' speed='' duplex='' mac_id=''
|
local eth_id='' speed='' duplex='' mac_id='' oper_state=''
|
||||||
|
|
||||||
for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ ))
|
for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ ))
|
||||||
do
|
do
|
||||||
|
@ -3063,9 +3063,12 @@ get_network_advanced_data()
|
||||||
if [[ -f $working_path/address ]];then
|
if [[ -f $working_path/address ]];then
|
||||||
mac_id=$( cat $working_path/address )
|
mac_id=$( cat $working_path/address )
|
||||||
fi
|
fi
|
||||||
|
if [[ -f $working_path/operstate ]];then
|
||||||
|
oper_state=$( cat $working_path/operstate )
|
||||||
|
fi
|
||||||
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","$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]}","$eth_id","$oper_state","$speed","$duplex","$mac_id
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -4904,23 +4907,26 @@ print_networking_data()
|
||||||
print_network_advanced_data()
|
print_network_advanced_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local network_data='' eth_id='N/A' duplex='N/A' mac_id='N/A' speed='N/A'
|
local network_data='' eth_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 [[ $B_SHOW_ADVANCED_NETWORK == 'true' ]];then
|
||||||
if [[ -n ${a_network_working[5]} ]];then
|
if [[ -n ${a_network_working[5]} ]];then
|
||||||
eth_id=${a_network_working[5]}
|
eth_id=${a_network_working[5]}
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[6]} ]];then
|
if [[ -n ${a_network_working[6]} ]];then
|
||||||
speed=${a_network_working[6]}
|
oper_state=${a_network_working[6]}
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[7]} ]];then
|
if [[ -n ${a_network_working[7]} ]];then
|
||||||
duplex=${a_network_working[7]}
|
speed="${a_network_working[7]} Mbps"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[8]} ]];then
|
if [[ -n ${a_network_working[8]} ]];then
|
||||||
mac_id=${a_network_working[8]}
|
duplex=${a_network_working[8]}
|
||||||
fi
|
fi
|
||||||
network_data="${C1}Net:${C2} $eth_id ${C1}Speed:${C2} $speed"
|
if [[ -n ${a_network_working[9]} ]];then
|
||||||
network_data="$network_data ${C1}Duplex:${C2} $duplex ${C1}Mac:${C2} $mac_id"
|
mac_id=${a_network_working[9]}
|
||||||
|
fi
|
||||||
|
network_data="${C1}Net:${C2} $eth_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" )
|
network_data=$( create_print_line " " "$network_data" )
|
||||||
print_screen_output "$network_data"
|
print_screen_output "$network_data"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue