]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tools: don't watch nonexistent daemons
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 21 Dec 2018 16:00:42 +0000 (17:00 +0100)
committerDavid Lamparter <equinox@diac24.net>
Fri, 18 Jan 2019 14:42:57 +0000 (15:42 +0100)
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>
tools/frrcommon.sh.in

index fa2fdc94b2af6973083060e0819eda70e3bd04d5..588aa6d103e10a086c3e1dcedeb63114fb53adf2 100644 (file)
@@ -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