From 29a64c0fd5be6ade4c8e5eeb094422be5e7c6043 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 21 Dec 2018 17:00:42 +0100 Subject: [PATCH] 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 --- tools/frrcommon.sh.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in index fa2fdc94b2..588aa6d103 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 -- 2.39.5