From 663045e4f0c0c0d7f03988d38e808773663f8309 Mon Sep 17 00:00:00 2001 From: Matias Barcenas Date: Sun, 20 Aug 2017 15:08:42 -0500 Subject: [PATCH] Fixed bug affecting empty name (phy#) files. --- lib/InterfaceUtils.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/InterfaceUtils.sh b/lib/InterfaceUtils.sh index 1ae01cf..5b67446 100644 --- a/lib/InterfaceUtils.sh +++ b/lib/InterfaceUtils.sh @@ -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