diff options
-rwxr-xr-x | automated/utils/vland/get_vland_pci_dev.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/automated/utils/vland/get_vland_pci_dev.sh b/automated/utils/vland/get_vland_pci_dev.sh new file mode 100755 index 0000000..2c9726d --- /dev/null +++ b/automated/utils/vland/get_vland_pci_dev.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +vland_name=${1} + +iface=$("$(readlink -f "$(dirname "$0")")"/get_vland_interface.sh "${vland_name}") +if [ -L "/sys/class/net/${iface}/device" ]; then + basename "$(readlink -f "/sys/class/net/${iface}/device")" +else + exit 1 +fi |