diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2007-12-12 20:12:56 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2007-12-12 20:12:56 -0800 |
commit | ccc86da96be587935f616ce5ce8715c67f6d2f87 (patch) | |
tree | ccce5e903de713d790d9d11b07bd590b9bc4c92b /templates/protocols/static/route | |
parent | 51e5d904b6a51ed07a0eaeda12c1d15c1f6a8c0a (diff) | |
download | vyatta-cfg-quagga-ccc86da96be587935f616ce5ce8715c67f6d2f87.tar.gz vyatta-cfg-quagga-ccc86da96be587935f616ce5ce8715c67f6d2f87.zip |
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
Diffstat (limited to 'templates/protocols/static/route')
-rw-r--r-- | templates/protocols/static/route/node.tag/blackhole/node.def | 4 | ||||
-rw-r--r-- | templates/protocols/static/route/node.tag/next-hop/node.def | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/templates/protocols/static/route/node.tag/blackhole/node.def b/templates/protocols/static/route/node.tag/blackhole/node.def index c1a8cc2c..5bfab1a8 100644 --- a/templates/protocols/static/route/node.tag/blackhole/node.def +++ b/templates/protocols/static/route/node.tag/blackhole/node.def @@ -1,11 +1,11 @@ help: "Silently discard pkts when matched" delete: "touch /tmp/static.\\$PPID" end: "if [ -f \"/tmp/static.\\$PPID\" ]; then \ - /usr/bin/vtysh -c \"configure terminal\" -c \"no ip route $(../@) null0\" ; \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route $(../@) null0\" ; \ rm /tmp/static.\\$PPID; \ else \ if [ -n \"$(./distance/@)\" ]; then \ DIST=\"$(./distance/@)\"; \ fi; \ - /usr/bin/vtysh -c \"configure terminal\" -c \"ip route $(../@) null0 \\$DIST \" ; \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"ip route $(../@) null0 \\$DIST \" ; \ fi; " diff --git a/templates/protocols/static/route/node.tag/next-hop/node.def b/templates/protocols/static/route/node.tag/next-hop/node.def index 6d9288cf..7d02f9d6 100644 --- a/templates/protocols/static/route/node.tag/next-hop/node.def +++ b/templates/protocols/static/route/node.tag/next-hop/node.def @@ -3,11 +3,11 @@ type: ipv4 help: "Configure the next-hop router" delete: "touch /tmp/static.\\$PPID" end: "if [ -f \"/tmp/static.\\$PPID\" ]; then \ - /usr/bin/vtysh -c \"configure terminal\" -c \"no ip route $(../@) $(@)\" ; \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route $(../@) $(@)\" ; \ rm /tmp/static.\\$PPID; \ else \ if [ -n \"$(./distance/@)\" ]; then \ DIST=\"$(./distance/@)\"; \ fi; \ - /usr/bin/vtysh -c \"configure terminal\" -c \"ip route $(../@) $(@) \\$DIST \" ; \ + \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"ip route $(../@) $(@) \\$DIST \" ; \ fi; " |