diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:53:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:53:32 +0000 |
commit | 25b1166673c7fde5edb4dfa218005bf1a83eb25c (patch) | |
tree | 0eb5dc2c4eedabf82b7b531bbe0e5fcb75084e3e /debian/tests/py-frr-reload | |
parent | Adding upstream version 8.4.4. (diff) | |
download | frr-debian.tar.xz frr-debian.zip |
Adding debian version 8.4.4-1.1~deb12u1.debian/8.4.4-1.1_deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/py-frr-reload')
-rwxr-xr-x | debian/tests/py-frr-reload | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/tests/py-frr-reload b/debian/tests/py-frr-reload new file mode 100755 index 0000000..6dfef33 --- /dev/null +++ b/debian/tests/py-frr-reload @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +# should have been started on install, but policy may have inhibited that +service frr restart + +# these should be running by default +pgrep watchfrr +pgrep zebra +pgrep staticd + +# configure interactively, save to file +vtysh -c 'configure terminal' -c 'ip route 198.51.100.0/28 127.0.0.1' +vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.0/28 127.0.0.1' +vtysh -c 'write memory' + +grep -q 'ip route 198.51.100.0/28 127.0.0.1' /etc/frr/frr.conf + +# configure in file, check interactively +sed -e '/^ip route 198.51.100.0\/28 127.0.0.1/ c ip route 198.51.100.64/28 127.0.0.1' \ + -i /etc/frr/frr.conf + +service frr reload + +# wait for the new config to load +for __t in $(seq 1 10); do + if vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.64/28 127.0.0.1'; then + break + fi + sleep "$__t" +done + +# fail if the old config is still loaded +if vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.0/28 127.0.0.1'; then + exit 1 +fi |