diff options
author | Carl Byington <carl@five-ten-sg.com> | 2015-01-16 09:19:59 -0800 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-05-03 19:16:23 +0200 |
commit | d685c9aa73f0dde1d1ac52ad44c6a4eb8ff5fafc (patch) | |
tree | d85e78b8e3a1e06345eb758e140fb32b9eaab426 /scripts/vyatta-next-hop-check | |
parent | 6eaf62fe98a1799ec490c335e0d2f4806e677a3a (diff) | |
download | vyatta-cfg-quagga-d685c9aa73f0dde1d1ac52ad44c6a4eb8ff5fafc.tar.gz vyatta-cfg-quagga-d685c9aa73f0dde1d1ac52ad44c6a4eb8ff5fafc.zip |
allow dhcp-interface for the next-hop on static routes
Signed-off-by: Daniil Baturin <daniil@baturin.org>
Diffstat (limited to 'scripts/vyatta-next-hop-check')
-rw-r--r-- | scripts/vyatta-next-hop-check | 10 |
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 |