diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-08-08 10:54:38 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-08-08 10:54:38 -0700 |
commit | 35ef3ab0d3ead228ebb96cbca6b348b1f1c9e1b9 (patch) | |
tree | 7137a566b981c7d7cab5a0e714e4e80903209dbe | |
parent | cc2dc022efb72aa5afe00b71fa5dfca5cf7f43bc (diff) | |
download | vyatta-cfg-quagga-35ef3ab0d3ead228ebb96cbca6b348b1f1c9e1b9.tar.gz vyatta-cfg-quagga-35ef3ab0d3ead228ebb96cbca6b348b1f1c9e1b9.zip |
Fix syntax problems identified by /opt/vyatta/sbin/check_tmpl
-rw-r--r-- | templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def | 5 | ||||
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def index e8704ac4..34b31199 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def @@ -1,7 +1,10 @@ help: Set any IP address to match -commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ + +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" + commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "\ policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" + commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def index 8c2611ff..0cad0615 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def @@ -1,12 +1,19 @@ type: txt help: Set an IP prefix-list to match comp_help: \1 <txt>\t\tprefix-list name + commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-list: you can only specify a prefix-list or access-list" + commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-list: prefix-list $VAR(@) does not exist" + commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-list: you must specify an action" + update: vyatta-vtysh -c "configure terminal" \ - -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ - -c "match ip route-source prefix-list $VAR(@)" -delete:expression: "vyatta-vtysh -c \"configure terminal" \ - -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ - -c "no match ip route-source prefix-list $VAR(@)" + -c "route-map $VAR(../../../../../@) \ + $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "match ip route-source prefix-list $VAR(@)" + +delete: vyatta-vtysh -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) \ + $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "no match ip route-source prefix-list $VAR(@)" |