Fixed bug affecting empty name (phy#) files.

This commit is contained in:
Matias Barcenas 2017-08-20 15:08:42 -05:00
parent 9a1464fda4
commit 663045e4f0
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,8 @@ function interface_physical() {
if [ -d "$interface_physical_path" ]; then
if [ -r "$interface_physical_path/name" ]
then InterfacePhysical="`cat "$interface_physical_path/name"`"
fi
if [ ! "${InterfacePhysical// }" ]; then
else InterfacePhysical="`ls -l "$interface_physical_path" | sed 's/^.*\/\([a-zA-Z0-9_-]*\)$/\1/'`"
fi
fi