gui: Use interface names from /sys/class/net when it exists.
This commit is contained in:
parent
3d7aab1149
commit
0221673d1e
1 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue