diff options
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 |