a bit of optimizing

This commit is contained in:
inxi-svn 2011-04-30 08:40:40 +00:00
parent 4baf69f8d5
commit 4b553d6073

9
inxi
View file

@ -3369,6 +3369,7 @@ get_network_advanced_data()
duplex=''
mac_id=''
oper_state=''
usb_data=''
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
else
@ -3390,9 +3391,11 @@ get_network_advanced_data()
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=
driver_test=$( grep -si 'DRIVER=' $working_path/uevent | cut -d '=' -f 2 )
if [[ -n $driver_test ]];then
a_network_adv_working[1]=$driver_test
if [[ -n $usb_data ]];then
driver_test=$( grep -si 'DRIVER=' $working_path/uevent | cut -d '=' -f 2 )
if [[ -n $driver_test ]];then
a_network_adv_working[1]=$driver_test
fi
fi
if [[ -e $working_path/net ]];then