summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/vyatta-next-hop-check10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/vyatta-next-hop-check b/scripts/vyatta-next-hop-check
index bd81284d..a00c54f4 100644
--- a/scripts/vyatta-next-hop-check
+++ b/scripts/vyatta-next-hop-check
@@ -11,15 +11,17 @@ if [[ ${FAM} = 'ipv6' ]]; then
SUFFIX='6'
fi
if [[ ${TYPE} = 'address' ]]; then
- # Check that there is still a next-hop or blackhole if the parent is not deleted
+ # Check that there is still a next-hop or blackhole or dhcp-interface if the parent is not deleted
ARR=( $(cli-shell-api listNodes protocols static route${SUFFIX} ${ROUTE} next-hop) )
cli-shell-api exists protocols static route${SUFFIX} ${ROUTE} blackhole
RETVAL_BH=$?
- cli-shell-api exists protocols static route${SUFFIX} ${ROUTE}
+ cli-shell-api exists protocols static route${SUFFIX} ${ROUTE} dhcp-interface
+ RETVAL_DHCP=$?
+ cli-shell-api exists protocols static route${SUFFIX} ${ROUTE}
RETVAL_PARENT=$?
- if [ ${#ARR} -eq 0 ] && [ $RETVAL_BH -eq 1 ] && [ $RETVAL_PARENT -eq 0 ]
+ if [ ${#ARR} -eq 0 ] && [ $RETVAL_BH -eq 1 ] && [ $RETVAL_DHCP -eq 1 ]&& [ $RETVAL_PARENT -eq 0 ]
then
- echo "Must add either a next-hop or blackhole for route ${ROUTE}"
+ echo "Must add either a next-hop or blackhole or dhcp-interface for route ${ROUTE}"
exit 1
fi
elif [[ ${TYPE} = 'interface' ]];then