summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/load-balancing/wan/interface-health/node.def11
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/load-balancing/wan/interface-health/node.def b/templates/load-balancing/wan/interface-health/node.def
index 75cadd9..24a05c0 100644
--- a/templates/load-balancing/wan/interface-health/node.def
+++ b/templates/load-balancing/wan/interface-health/node.def
@@ -1,4 +1,13 @@
tag:
type: txt
help: Set interface name
-
+syntax:expression: exec " \
+ if [ -z \"`ip link | grep $VAR(@)`\" ]; then \
+ echo Invalid interface [$VAR(@)]; \
+ exit 1 ; \
+ fi ; "
+allowed: for dev in /sys/class/net/*;
+ do if [[ ! $dev =~ "net/lo" ]]; then
+ echo -n ${dev##*/} " "
+ fi
+ done