From b82ad4c0d1f5b78f7b254d4aa2963d7366343725 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 14 May 2020 14:07:23 -0400 Subject: [PATCH] tools: Only load instances or daemon Original start/stop of FRR prior to David's rewrite in PR 3507, when configuring multi-instance would only start multi-instance (-1 -2 -3 -4...) or just the daemon, not both. If you happened to start a ospfd instance of 1 then both the default and instance 1 would react to cli. Do not allow this, put it back to original behavior Signed-off-by: Donald Sharp --- tools/frrcommon.sh.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in index 0dfdfd0efa..00d13b2d02 100644 --- a/tools/frrcommon.sh.in +++ b/tools/frrcommon.sh.in @@ -90,7 +90,7 @@ daemon_list() { continue fi debug "$daemon enabled" - enabled="$enabled $daemon" + if [ -n "$inst" ]; then debug "$daemon multi-instance $inst" oldifs="${IFS}" @@ -99,6 +99,8 @@ daemon_list() { enabled="$enabled $daemon-$i" done IFS="${oldifs}" + else + enabled="$enabled $daemon" fi else debug "$daemon disabled" -- 2.39.5