diff options
author | Mark Stapp <mstapp@nvidia.com> | 2022-08-15 22:40:08 +0200 |
---|---|---|
committer | Mark Stapp <mstapp@nvidia.com> | 2022-08-15 22:40:08 +0200 |
commit | 2000ac4075bbe1a9557ee30286309d3ade72b3a7 (patch) | |
tree | f08db06a5da09ed900364f5c5d4c2344139c5c19 /tools | |
parent | Merge pull request #11778 from AbhishekNR/ttable_mroute (diff) | |
download | frr-2000ac4075bbe1a9557ee30286309d3ade72b3a7.tar.xz frr-2000ac4075bbe1a9557ee30286309d3ade72b3a7.zip |
tools: stop zebra daemon last
When stopping the FRR daemons, stop zebra last, after trying
to stop the other daemons.
Signed-off-by: Mark Stapp <mstapp@nvidia.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/frrcommon.sh.in | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in index 759d49837..b589ced96 100755 --- a/tools/frrcommon.sh.in +++ b/tools/frrcommon.sh.in @@ -272,7 +272,7 @@ all_start() { } all_stop() { - local pids reversed + local pids reversed need_zebra daemon_list enabled_daemons disabled_daemons [ "$1" = "--reallyall" ] && enabled_daemons="$enabled_daemons $disabled_daemons" @@ -282,13 +282,23 @@ all_stop() { reversed="$dmninst $reversed" done + # Stop zebra last, after trying to stop the other daemons for dmninst in $reversed; do + if [ "$dmninst" = "zebra" ]; then + need_zebra="yes" + continue + fi + daemon_stop "$dmninst" "$1" & pids="$pids $!" done for pid in $pids; do wait $pid done + + if [ -n "$need_zebra" ]; then + daemon_stop "zebra" + fi } all_status() { |