summaryrefslogtreecommitdiff
path: root/automated/utils/vland/get_vland_mac.sh
diff options
context:
space:
mode:
Diffstat (limited to 'automated/utils/vland/get_vland_mac.sh')
-rwxr-xr-xautomated/utils/vland/get_vland_mac.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/automated/utils/vland/get_vland_mac.sh b/automated/utils/vland/get_vland_mac.sh
new file mode 100755
index 0000000..cb96939
--- /dev/null
+++ b/automated/utils/vland/get_vland_mac.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+vland_name="${1}"
+
+iface=$("$(readlink -f "$(dirname "$0")")"/get_vland_interface.sh "${vland_name}")
+if [ -z "${iface}" ]; then
+ exit 1
+fi
+cat /sys/class/net/"${iface}"/address