gui: Use interface names from /sys/class/net when it exists.

This commit is contained in:
tgoff0 2015-01-21 21:37:56 +00:00
parent 3d7aab1149
commit 0221673d1e

View file

@ -107,7 +107,12 @@ proc checkRJ45s {} {
global systype node_list g_prefs
if { [lindex $systype 0] == "Linux" } {
set extifcs [nexec localnode /sbin/ifconfig -a -s | tail -n +2 | awk "{ print \$1 }" | xargs]
if { [file exists /sys/class/net] &&
[file isdirectory /sys/class/net] } {
set extifcs [nexec localnode ls /sys/class/net]
} else {
set extifcs [nexec localnode /sbin/ifconfig -a -s | tail -n +2 | awk "{ print \$1 }" | xargs]
}
set extifcs \
[lreplace $extifcs [lsearch $extifcs lo] [lsearch $extifcs lo]]
} else {