diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-10-02 18:26:40 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-10-02 18:26:40 -0700 |
commit | 54e776a0c09e41cbd867a69093845f1f45deaba1 (patch) | |
tree | 48187c4bf340d534207ac2b9ff051788e82de801 /templates | |
parent | 1a693f8e8209f80563e4671a55bac1079bddc006 (diff) | |
download | vyatta-cfg-quagga-54e776a0c09e41cbd867a69093845f1f45deaba1.tar.gz vyatta-cfg-quagga-54e776a0c09e41cbd867a69093845f1f45deaba1.zip |
use pattern instead of exec
Diffstat (limited to 'templates')
-rw-r--r-- | templates/zone-policy/zone/node.def | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/templates/zone-policy/zone/node.def b/templates/zone-policy/zone/node.def index 80e4f4e2..a27f90a9 100644 --- a/templates/zone-policy/zone/node.def +++ b/templates/zone-policy/zone/node.def @@ -2,11 +2,8 @@ tag: type: txt help: Set zone name -syntax:expression: exec " \ - if [ `echo -n '$VAR(@)' | wc -c` -gt 20 ]; then \ - echo Zone name must be 20 characters or less; \ - exit 1 ; \ - fi ; " +syntax:expression: pattern $VAR(@) "^[[:print:]]{1,20}$" ; + "Zone name must be 20 characters or less" syntax:expression: pattern $VAR(@) "^[^-]" ; "Zone name cannot start with \"-\"" |