1
0
mirror of https://github.com/jerikan-network/cmdb.git synced 2024-05-06 04:54:50 +00:00
Files
Vincent Bernat d191613ab8 Initial release
No history. If you have the original history, you can use:

```
git replace THISCOMMIT b0b998bd1c651e308ac71a9158e07e5c3521a281
```
2021-05-15 16:18:03 +02:00

20 lines
391 B
Bash
Executable File

#!/bin/sh
output=$(mktemp)
trap "rm -f $output" EXIT
vtysh -u $(whoami) --dryrun -f output/"$1"/frr.conf 2> $output
ret=$?
>&2 cat $output
case $ret in
2)
# FRR doesn't know valide command exit-vrf, maybe a version
# issue?
! grep -vq "^.*exit-vrf$" $output || exit 2
! grep -q "^.*exit-vrf$" $output || exit 0
exit 2
;;
esac
exit $ret