summaryrefslogtreecommitdiffstats
path: root/tools/frrcommon.sh.in
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-12-21 17:00:42 +0100
committerDavid Lamparter <equinox@diac24.net>2019-02-19 21:34:08 +0100
commit380fe10b1651f48a5b890874553d312de5e80e92 (patch)
tree37abdf02464fc8f703b6b1cd8cc5b026604259d3 /tools/frrcommon.sh.in
parentwatchfrr: don't wait forever at startup (diff)
downloadfrr-380fe10b1651f48a5b890874553d312de5e80e92.tar.xz
frr-380fe10b1651f48a5b890874553d312de5e80e92.zip
tools: don't watch nonexistent daemons
If we try to monitor a nonexisting daemon in watchfrr, it will (currently) forever wait at startup since the vty connection will never come up. Just drop the daemon from the daemon list in such a case. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to '')
-rw-r--r--tools/frrcommon.sh.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in
index fa2fdc94b..588aa6d10 100644
--- a/tools/frrcommon.sh.in
+++ b/tools/frrcommon.sh.in
@@ -85,6 +85,9 @@ daemon_list() {
eval inst=\$${daemon}_instances
[ "$daemon" = zebra -o "$daemon" = staticd ] && cfg=yes
if [ -n "$cfg" -a "$cfg" != "no" -a "$cfg" != "0" ]; then
+ if ! daemon_prep "$daemon" "$inst"; then
+ continue
+ fi
debug "$daemon enabled"
enabled="$enabled $daemon"
if [ -n "$inst" ]; then