mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
trying a bug fix for broadcom id
This commit is contained in:
parent
764bea1a31
commit
652585c9f9
13
inxi
13
inxi
|
@ -2,8 +2,8 @@
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.7.24
|
#### version: 1.7.24
|
||||||
#### Date: October 3 2011
|
#### Date: November 21 2011
|
||||||
#### Patch Number: 00
|
#### Patch Number: 01
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -4469,11 +4469,20 @@ get_network_advanced_data()
|
||||||
# /sys/bus/pci/devices/0000:02:02.0/net/eth1
|
# /sys/bus/pci/devices/0000:02:02.0/net/eth1
|
||||||
# real paths are: /sys/devices/pci0000:00/0000:00:1e/0/0000:02:02.0/net/eth1/uevent
|
# real paths are: /sys/devices/pci0000:00/0000:00:1e/0/0000:02:02.0/net/eth1/uevent
|
||||||
# and on older debian kernels: /sys/devices/pci0000:00/0000:02:02.0/net:eth1/uevent
|
# and on older debian kernels: /sys/devices/pci0000:00/0000:02:02.0/net:eth1/uevent
|
||||||
|
# but broadcom shows this sometimes:
|
||||||
|
# /sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/ssb0:0/uevent:['DRIVER=b43', 'MODALIAS=ssb:v4243id0812rev0D']:
|
||||||
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
|
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
|
||||||
# now we want the real one, that xiin also displays, without symbolic links.
|
# now we want the real one, that xiin also displays, without symbolic links.
|
||||||
if [[ -e $working_path ]];then
|
if [[ -e $working_path ]];then
|
||||||
working_path=$( readlink -f $working_path 2>/dev/null )
|
working_path=$( readlink -f $working_path 2>/dev/null )
|
||||||
fi
|
fi
|
||||||
|
# sometimes there is another directory between the path and /net
|
||||||
|
if [[ ! -e $working_path/net ]];then
|
||||||
|
# using find here, probably will need to also use it in usb part since the grep
|
||||||
|
# method seems to not be working now. Slice off the rest, which leaves the basic path
|
||||||
|
working_path=$( find $working_path/*/uevent 2>/dev/null | \
|
||||||
|
sed 's|/net.*||' )
|
||||||
|
fi
|
||||||
# working_path=$( ls /sys/devices/pci*/*/0000:${a_network_adv_working[4]}/net/*/uevent )
|
# working_path=$( ls /sys/devices/pci*/*/0000:${a_network_adv_working[4]}/net/*/uevent )
|
||||||
else
|
else
|
||||||
# slice off the usb- part
|
# slice off the usb- part
|
||||||
|
|
Loading…
Reference in a new issue