diff --git a/init/functions b/init/functions index 29573a7..4ed27e6 100644 --- a/init/functions +++ b/init/functions @@ -131,7 +131,9 @@ umount_retry() { get_iface_from_mac() { local mac="$1" local iface - iface="$(ip -o link | grep -i "$mac" | awk '{print $2}' | cut -d ':' -f1)" + if [ "x$mac" != "x" ]; then + iface="$(ip -o link | grep -i "$mac" | awk '{print $2}' | cut -d ':' -f1)" + fi echo "$iface" }