diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-06-17 16:45:00 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-06-17 16:45:00 -0500 |
commit | 2a58e65ed3d4368e8ed084df331a0e1e31eec3b5 (patch) | |
tree | 09cb7c8903e67f4499ec92640314342c249c3fd0 /templates/protocols/static/route | |
parent | f6433b4e2cc5891e08d6666de53aea2a8c8ed12f (diff) | |
download | vyatta-cfg-quagga-2a58e65ed3d4368e8ed084df331a0e1e31eec3b5.tar.gz vyatta-cfg-quagga-2a58e65ed3d4368e8ed084df331a0e1e31eec3b5.zip |
Bugfix 6816: Make previous bugfix more maintainable by moving check to a script instead of defining it in multiple node.defs
Diffstat (limited to 'templates/protocols/static/route')
-rw-r--r-- | templates/protocols/static/route/node.tag/next-hop/node.def | 13 |
1 files changed, 2 insertions, 11 deletions
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 9160dd8d..eb41b4e4 100644 --- a/templates/protocols/static/route/node.tag/next-hop/node.def +++ b/templates/protocols/static/route/node.tag/next-hop/node.def @@ -6,18 +6,9 @@ end: then 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 - if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \ "$VAR(../@)" "$VAR(@)" then |