diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/interfaces/bridge/node.def | 4 | ||||
-rw-r--r-- | templates/interfaces/tunnel/node.def | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def index 0dc3670c..641d369d 100644 --- a/templates/interfaces/bridge/node.def +++ b/templates/interfaces/bridge/node.def @@ -2,7 +2,7 @@ tag: type: txt help: Set bridge interface -syntax:expression: $VAR(@) in "br0", "br1", "br2", "br3", "br4", "br5", "br6", "br7", "br8", "br9" ; "Must be (br0 - br9)" +syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)" create: sudo brctl addbr $VAR(@) @@ -13,4 +13,4 @@ delete: if [ -n "`/usr/sbin/brctl show | grep $VAR(@) | grep eth`" ]; then sudo ip link set $VAR(@) down; sudo brctl delbr $VAR(@); -comp_help: "Enter bridge interface name (br0 - br9)" +comp_help: "Enter bridge interface name (br0 - br999)" diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index d152dbe5..89ee200c 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -2,7 +2,8 @@ tag: type: txt help: Set tunnel interface -syntax:expression: exec "echo $VAR(@) | grep \"tun[0-9][0-9]\\{0,2\\}\$\" > /dev/null "; "tunnel must be (tun0-tun999)" +syntax:expression: pattern $VAR(@) "^tun[0-9]+$" \ + ; "tunnel must be (tun0-tun999)" commit:expression: $VAR(./local-ip/) != "" ; \ "Must configure the tunnel local-ip for $VAR(@)" |