diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/qos-policy/traffic-shaper/node.tag/class/node.tag/match/node.tag/interface/node.def | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/match/node.tag/interface/node.def b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/match/node.tag/interface/node.def index fe7933c..c0451f5 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/match/node.tag/interface/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/match/node.tag/interface/node.def @@ -1,11 +1,7 @@ -tag: type: txt -help: Ethernet interface name -syntax:expression: exec " \ - if [ -z \"`ip link | egrep -v 'eth[0-9]+[.]' | grep $VAR(@)`\" ]; then \ - echo Invalid ethernet interface [$VAR(@)]; \ - exit 1 ; \ - fi ; " -allowed: local -a array ; - array=( /sys/class/net/{eth,vmnet}[0-9]+[^.] ) ; - echo -n ${array[@]##*/} +help: Interface name +syntax:expression: exec "[ -f /sys/class/net/$VAR(@)/ifindex ]" ; "Interface must already exist" +allowed: local -a array + array=( /sys/class/net/* ) + echo -n ${array[@]##*/} + |