From 1686b1d4864384ee508b58418f20970f2dff2587 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 29 Mar 2022 17:47:48 -0400 Subject: [PATCH] tools: Modify all_stop to actually try to stop all daemons If a user enters: /usr/lib/frr/frrinit.sh start then calls: /usr/lib/frr/frrinit.sh stop The daemon(s) that are removed from the file are not stopped. Apparently in shell scripting naming the variables the same as the callee does not work as one would think. Just renaming the variable to something else solved the problem. Signed-off-by: Donald Sharp --- tools/frrcommon.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in index d95f2d4be7..52f5277d25 100644 --- a/tools/frrcommon.sh.in +++ b/tools/frrcommon.sh.in @@ -253,11 +253,11 @@ all_start() { all_stop() { local pids reversed - daemon_list daemons disabled - [ "$1" = "--reallyall" ] && daemons="$daemons $disabled" + daemon_list enabled_daemons disabled_daemons + [ "$1" = "--reallyall" ] && enabled_daemons="$enabled_daemons $disabled_daemons" reversed="" - for dmninst in $daemons; do + for dmninst in $enabled_daemons; do reversed="$dmninst $reversed" done -- 2.39.5