using readlink to provide true path now for -n advanced data

This commit is contained in:
inxi-svn 2011-06-23 03:12:47 +00:00
parent 35c69c03c8
commit ccd1dedec8

4
inxi
View file

@ -4322,6 +4322,10 @@ get_network_advanced_data()
# 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
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.
if [[ -e $working_path ]];then
working_path=$( readlink -f $working_path 2>/dev/null )
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