From ccc86da96be587935f616ce5ce8715c67f6d2f87 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Wed, 12 Dec 2007 20:12:56 -0800 Subject: Add wrapper script between cfg templates and vtysh. The wrapper will: - log commands to /tmp/vtysh.log - return error code when quagga responds with an errmsg - ignore errors when called with -n --- templates/policy/prefix-list/node.tag/rule/node.def | 4 ++-- templates/policy/route-map/node.def | 2 +- templates/policy/route-map/node.tag/rule/node.tag/action/node.def | 4 ++-- templates/policy/route-map/node.tag/rule/node.tag/call/node.def | 4 ++-- templates/policy/route-map/node.tag/rule/node.tag/continue/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/match/as-path/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/match/community/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/match/interface/node.def | 4 ++-- .../node.tag/rule/node.tag/match/ip/address/access-list/node.def | 4 ++-- .../node.tag/rule/node.tag/match/ip/address/prefix-list/node.def | 4 ++-- .../node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def | 4 ++-- .../node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def | 4 ++-- .../node.tag/rule/node.tag/match/ip/route-source/access-list/node.def | 4 ++-- .../node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/match/metric/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/match/origin/node.def | 4 ++-- templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def | 4 ++-- templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/on-match/next/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def | 4 ++-- .../route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def | 4 ++-- .../route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/set/community/node.def | 4 ++-- .../policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def | 4 ++-- .../route-map/node.tag/rule/node.tag/set/local-preference/node.def | 4 ++-- templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def | 4 ++-- templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def | 4 ++-- .../route-map/node.tag/rule/node.tag/set/originator-id/node.def | 4 ++-- templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def | 4 ++-- templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def | 4 ++-- 32 files changed, 63 insertions(+), 63 deletions(-) (limited to 'templates/policy') diff --git a/templates/policy/prefix-list/node.tag/rule/node.def b/templates/policy/prefix-list/node.tag/rule/node.def index 35ebe6e8..e45083ca 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.def @@ -10,7 +10,7 @@ delete: "touch /tmp/protocols-$(../@)-$(@).\\$PPID \ if [ -n \"$(./le/@)\" ]; then \ COND=\"\\$COND le $(./le/@) \"; \ fi; \ - /usr/bin/vtysh -c \"configure terminal\" \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"no ip prefix-list $(../@) seq $(@) $(./action/@) $(./prefix/@) \\$COND \" " end: "LEN=`echo $(./prefix/@) | awk -F/ '{ print \\$2 }'` ; \ if [ -n \"$(./ge/@)\" ]; then \ @@ -30,7 +30,7 @@ end: "LEN=`echo $(./prefix/@) | awk -F/ '{ print \\$2 }'` ; \ if [ -f \"/tmp/protocols-$(../@)-$(@).\\$PPID\" ]; then \ rm -f \"protocols-$(../@)-$(@).\\$PPID\" ; \ else \ - /usr/bin/vtysh -c \"configure terminal\" \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"ip prefix-list $(../@) seq $(@) $(./action/@) $(./prefix/@) \\$COND \" ; \ fi ; \ exit 0 ; " diff --git a/templates/policy/route-map/node.def b/templates/policy/route-map/node.def index 95dc9d53..ec188a4b 100644 --- a/templates/policy/route-map/node.def +++ b/templates/policy/route-map/node.def @@ -2,4 +2,4 @@ tag: type: txt help: "Create route-map or enter route-map command mode" syntax: pattern $(@) "^[-a-zA-Z0-9.]+$" ; "route-map $(@): name must be alpha-numeric" -delete: "/usr/bin/vtysh -c\"configure terminal\" -c\"no route-map $(@)\" " +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -n -c \"configure terminal\" -c \"no route-map $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def index 9445ecff..f36be233 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def @@ -1,5 +1,5 @@ type: txt help: "Action to take on prefixes matching this rule" syntax: $(@) in "permit", "deny"; "route-map $(../../@) $(@) $(../@) action: must be permit or deny" -update: "/usr/bin/vtysh -c \"configure terminal\" -c \"route-map $(../../@) $(@) $(../@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"no route-map $(../../@) $(@) $(../@)\" " +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $(../../@) $(@) $(../@)\" " +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no route-map $(../../@) $(@) $(../@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/call/node.def b/templates/policy/route-map/node.tag/rule/node.tag/call/node.def index 8eaa720a..02f578a3 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/call/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/call/node.def @@ -2,7 +2,7 @@ type: txt help: "Target route-map name" commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" "; "route-map $(@) doesn't exist" commit: $(../action/) != ""; "must define an action for route-map $(../../@) rule $(../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" -c \"route-map $(../../@) $(../action/@) $(../@)\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $(../../@) $(../action/@) $(../@)\" \ -c \"call $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"route-map $(../../@) $(../action/@) $(../@)\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $(../../@) $(../action/@) $(../@)\" \ -c \"no call \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def b/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def index 3c3fa8d1..c925ec40 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def @@ -2,9 +2,9 @@ type: u32 help: "Continue on a different entry within the route-map" syntax: $(@) >= 1 && $(@) <= 65535; "continue must be between 1 and 65535" syntax: $(@) > $(../../@); "you may only continue forward in the route-map" -update: "/usr/bin/vtysh -c \"configure terminal\" +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $(../../@) $(../action/@) $(../@)\" \ -c \"continue $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $(../../@) $(../action/@) $(../@)\" \ -c \"no continue \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def index b776cadf..4f566402 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def @@ -2,9 +2,9 @@ type: txt help: "Match BGP AS path list" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $(@)\" "; "AS path list $(@) doesn't exist" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"match as-path $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no match as-path $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def index df9de17d..da0d8f44 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def @@ -4,7 +4,7 @@ end: "if [ -z \"$(./community-list/)\" ]; then \ echo You must configure a community-list ; \ exit 1 ; \ fi ; \ - /usr/bin/vtysh -c \"configure terminal\" \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no match community \" ; \ if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-match-community.\\$PPID\" ]; then \ @@ -13,7 +13,7 @@ end: "if [ -z \"$(./community-list/)\" ]; then \ if [ -n \"$(./exact-match/)\" ]; then \ cond=\"exact-match \"; \ fi ; \ - /usr/bin/vtysh -c \"configure terminal\" \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"match community $(./community-list/@) \\$cond\" ; \ fi; " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def index 1fe66d1a..3a594f51 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def @@ -7,9 +7,9 @@ syntax: exec " \ echo $(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"match interface $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no match interface $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def index 08f834b7..1edeccce 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def @@ -2,9 +2,9 @@ type: u32 help: "access-list number" commit: $(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" "; "access-list $(@) does not exist" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"match ip address $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"no match ip address $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def index c1a8cdbb..80911e6d 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def @@ -2,9 +2,9 @@ type: txt help: "prefix-list name" commit: $(../access-list/) == ""; "You can only specify a prefix-list or access-list" commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" "; "prefix-list $(@) does not exist" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"match ip address prefix-list $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"no match ip address prefix-list $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def index 00972d5c..81565610 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def @@ -2,9 +2,9 @@ type: u32 help: "access-list number" commit: $(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" "; "access-list $(@) does not exist" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"match ip next-hop $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"no match ip next-hop $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def index 3f88c51d..314ea6f3 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def @@ -2,9 +2,9 @@ type: txt help: "prefix-list name" commit: $(../access-list/) == ""; "You can only specify a prefix-list or access-list" commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" "; "prefix-list $(@) does not exist" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"match ip next-hop prefix-list $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"no match ip next-hop prefix-list $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def index c323adbb..909be735 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def @@ -2,9 +2,9 @@ type: u32 help: "access-list number" commit: $(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" "; "access-list $(@) does not exist" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"match ip route-source $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"no match ip route-source $(@)\" " 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 26b7f47d..27813153 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 @@ -2,9 +2,9 @@ type: txt help: "prefix-list name" commit: $(../access-list/) == ""; "You can only specify a prefix-list or access-list" commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" "; "prefix-list $(@) does not exist" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"match ip route-source prefix-list $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ -c \"no match ip route-source prefix-list $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def index a0464ba0..7cfab7b1 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def @@ -1,10 +1,10 @@ type: u32 help: "Match metric of route" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"match metric $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no match metric $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def index 7c2c8e05..d322135f 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def @@ -2,10 +2,10 @@ type: txt help: "BGP origin code" syntax: $(@) in "egp", "igp", "incomplete"; "origin must be egp, igp, or incomplete" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"match origin $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no match origin $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def index 6671b7c7..d90b5814 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def @@ -2,10 +2,10 @@ type: txt help: "Match peer address" syntax: exec "/opt/vyatta/sbin/vyatta-policy.pl --check-peer-syntax $(@)"; "peer must be either an IP or local" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"match peer $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no match peer \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def index 604ae3c8..4b92cb6b 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def @@ -2,10 +2,10 @@ type: u32 help: "Match tag of route" syntax: $(@) >= 1 && $(@) <= 65535; "tag must be between 1 and 65535" commit: $(../../action) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"match tag $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no match tag $(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def b/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def index d519dfbb..30cf2197 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def @@ -3,9 +3,9 @@ help: "Goto sequence number" syntax: $(../next/) == ""; "you can set only goto or next" syntax: $(@) >= 1 && $(@) <= 65535; "tag must be between 1 and 65535" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"on-match goto $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no on-match goto \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def b/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def index 43a66465..fa93fcf7 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def @@ -1,10 +1,10 @@ help: "Goto next sequence number" syntax: $(../goto/) == ""; "you can set only goto or next" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"on-match next \" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no on-match next \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def index ac9eac8f..342b8a8a 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def @@ -4,13 +4,13 @@ commit: $(../../action/) != ""; "Must configure an action" delete: "echo $(./as/@) $(./ip/@) > /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID" end: "if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID\" ]; then \ as=\\$(cat /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID); \ - /usr/bin/vtysh -c \"configure terminal\" \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set aggregator as \\$as\" ; \ rm -rf /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID; \ else \ as=\"$(./as/@) $(./ip/@)\"; \ - /usr/bin/vtysh -c \"configure terminal\" \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set aggregator as \\$as\" ; \ fi ; " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def index f3ca53fb..d308b37e 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def @@ -2,10 +2,10 @@ type: txt help: "Prepend string for a BGP AS-path attribute" syntax: exec "/opt/vyatta/sbin/vyatta-check-as-prepend.pl \"$(@)\" "; "Invalid AS path." commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set as-path prepend $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set as-path prepend \" " #comp_help: Enter a list of AS numbers to prepend. Use double quotes around the list (f.g. "456 64500 45001") diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def index 2c64f8d0..ba5344eb 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def @@ -1,8 +1,8 @@ help: "BGP atomic aggregate attribute" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set atomic-aggregate\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set atomic-aggregate\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def index c54c7fef..a6169894 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def @@ -4,7 +4,7 @@ end: "if [ -z \"$(./comm-list/)\" ]; then \ echo You must configure a comm-list ; \ exit 1 ; \ fi ; \ - /usr/bin/vtysh -c \"configure terminal\" \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set comm-list \" ; \ if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-comm-list.\\$PPID\" ]; then \ @@ -13,7 +13,7 @@ end: "if [ -z \"$(./comm-list/)\" ]; then \ if [ -n \"$(./delete/)\" ]; then \ cond=\"delete\" ; \ fi ; \ - /usr/bin/vtysh -c \"configure terminal\" \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set comm-list $(./comm-list/@) \\$cond\" ; \ fi; " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def index 8c258fc4..f77940af 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def @@ -1,9 +1,9 @@ type: txt help: "Community number in aa:nn format or local-AS|no-advertise|no-export|internet|additive or none" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set community $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set community \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def index e184f425..ac92a5c3 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def @@ -2,9 +2,9 @@ type: ipv4 help: "Next hop IP address" # TODO: can also set to peer for BGP commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set ip next-hop $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set ip next-hop \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def index 2e879b5c..4bb7e8b2 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def @@ -1,9 +1,9 @@ type: u32 help: "BGP local preference path attribute" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set local-preference $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set local-preference \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def index dd661452..a854d167 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def @@ -2,9 +2,9 @@ type: txt help: "Metric value for destination routing protocol" syntax: exec "if [ -n \"\\$(echo $(@) | sed 's/^[+-]*[0123456789]*//')\" ]; then exit 1; fi; "; "metric must be an integer with an optional +/- prepend" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set metric $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set metric \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def index a7e7d2f8..c0696612 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def @@ -2,9 +2,9 @@ type: txt help: "BGP origin code" syntax: $(@) in "igp", "egp", "incomplete"; "origin must be one of igp, egp, or incomplete" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set origin $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set origin \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def index 386a0295..c96f2371 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def @@ -1,9 +1,9 @@ type: ipv4 help: "BGP originator ID attribute" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set originator-id $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set originator-id \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def index 2780f423..b13f26ba 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def @@ -2,9 +2,9 @@ type: u32 help: "Tag value for routing protocol" syntax: $(@) >= 1 && $(@) <= 65535; "tag must be between 1 and 65535" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set tag $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set tag \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def index 408aac5f..7ac8958a 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def @@ -1,9 +1,9 @@ type: u32 help: "BGP weight for routing table" commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "/usr/bin/vtysh -c \"configure terminal\" \ +update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"set weight $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" \ +delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ -c \"no set weight \" " -- cgit v1.2.3