mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
a bit of optimizing
This commit is contained in:
parent
4baf69f8d5
commit
4b553d6073
9
inxi
9
inxi
|
@ -3369,6 +3369,7 @@ get_network_advanced_data()
|
||||||
duplex=''
|
duplex=''
|
||||||
mac_id=''
|
mac_id=''
|
||||||
oper_state=''
|
oper_state=''
|
||||||
|
usb_data=''
|
||||||
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
|
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
|
||||||
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
|
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
|
||||||
else
|
else
|
||||||
|
@ -3390,9 +3391,11 @@ get_network_advanced_data()
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/uevent grep for DRIVER=
|
# /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/uevent grep for DRIVER=
|
||||||
driver_test=$( grep -si 'DRIVER=' $working_path/uevent | cut -d '=' -f 2 )
|
if [[ -n $usb_data ]];then
|
||||||
if [[ -n $driver_test ]];then
|
driver_test=$( grep -si 'DRIVER=' $working_path/uevent | cut -d '=' -f 2 )
|
||||||
a_network_adv_working[1]=$driver_test
|
if [[ -n $driver_test ]];then
|
||||||
|
a_network_adv_working[1]=$driver_test
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -e $working_path/net ]];then
|
if [[ -e $working_path/net ]];then
|
||||||
|
|
Loading…
Reference in a new issue