diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-06-17 18:04:33 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-06-17 18:04:33 -0500 |
commit | ccc73a10bd4052342fa66b3853212aa3a9fc4c8f (patch) | |
tree | 449f3f6e09adde13a857fb4b04ca3e72a1e86f36 | |
parent | 9b69a2e73657bc69c54dfb37c1d2c328d0c7d4c5 (diff) | |
download | vyatta-cfg-quagga-ccc73a10bd4052342fa66b3853212aa3a9fc4c8f.tar.gz vyatta-cfg-quagga-ccc73a10bd4052342fa66b3853212aa3a9fc4c8f.zip |
Missed two nodes in the last commit
-rw-r--r-- | templates/protocols/static/route/node.tag/blackhole/node.def | 12 | ||||
-rw-r--r-- | templates/protocols/static/route6/node.tag/blackhole/node.def | 12 |
2 files changed, 4 insertions, 20 deletions
diff --git a/templates/protocols/static/route/node.tag/blackhole/node.def b/templates/protocols/static/route/node.tag/blackhole/node.def index c72fabd2..95c96046 100644 --- a/templates/protocols/static/route/node.tag/blackhole/node.def +++ b/templates/protocols/static/route/node.tag/blackhole/node.def @@ -1,16 +1,8 @@ help: Silently discard pkts when matched end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then - # Check that there is still a next-hop or blackhole if the parent is not deleted - ARR=( $(cli-shell-api listNodes protocols static route $VAR(../@) next-hop) ) - cli-shell-api exists protocols static route $VAR(../@) blackhole - RETVAL_BH=$? - cli-shell-api exists protocols static route $VAR(../@) - RETVAL_PARENT=$? - if [ ${#ARR} -eq 0 ] && [ $RETVAL_BH -eq 1 ] && [ $RETVAL_PARENT -eq 0 ] - then - echo "Must add either a next-hop or blackhole for route $VAR(../@)" - exit 1 + if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv4 address; then + exit 1; fi vtysh -c "configure terminal" \ diff --git a/templates/protocols/static/route6/node.tag/blackhole/node.def b/templates/protocols/static/route6/node.tag/blackhole/node.def index c8e202b2..4344aa5a 100644 --- a/templates/protocols/static/route6/node.tag/blackhole/node.def +++ b/templates/protocols/static/route6/node.tag/blackhole/node.def @@ -1,16 +1,8 @@ help: Silently discard pkts when matched end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then - # Check that there is still a next-hop or blackhole if the parent is not deleted - ARR=( $(cli-shell-api listNodes protocols static route6 $VAR(../@) next-hop) ) - cli-shell-api exists protocols static route6 $VAR(../@) blackhole - RETVAL_BH=$? - cli-shell-api exists protocols static route6 $VAR(../@) - RETVAL_PARENT=$? - if [ ${#ARR} -eq 0 ] && [ $RETVAL_BH -eq 1 ] && [ $RETVAL_PARENT -eq 0 ] - then - echo "Must add either a next-hop or blackhole for route $VAR(../@)" - exit 1 + if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv6 address; then + exit 1; fi vtysh -c "configure terminal" \ |