diff options
Diffstat (limited to 'templates/load-balancing/wan/interface-health/node.def')
-rw-r--r-- | templates/load-balancing/wan/interface-health/node.def | 11 |
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 b6f1d4e..fb23378 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: interface name - +syntax:expression: exec " \ + if [ -z \"`ip link | egrep -v 'eth[0-9]+[.]' | grep $VAR(@)`\" ]; then \ + echo Invalid interface [$VAR(@)]; \ + exit 1 ; \ + fi ; " +allowed: for dev in /sys/class/net/*; + do if [[ -L $dev/device ]] + then echo -n ${dev##*/} " " + fi + done |