summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>2022-06-01 11:58:52 +0200
committerMartin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>2022-06-01 11:58:52 +0200
commitc594796d0fdbc45ed3762a9a56a289c56a536361 (patch)
tree710b0093509c47cd982ae416996cdd7e1c0aa09d /tools
parentMerge pull request #11315 from gromit1811/fix_init_stop_msgs (diff)
downloadfrr-c594796d0fdbc45ed3762a9a56a289c56a536361.tar.xz
frr-c594796d0fdbc45ed3762a9a56a289c56a536361.zip
tools: Really fix all daemon shutdown without complaining about PID files
Fix daemon shutdown broken by f0cccaa6bf7dda71d0e1ad1b0406a9b453a84bb3. Now we still don't complain about missing PID files but actually stop the running daemons. The previous fix was broken because it passed a new "--all" option to daemon_stop which wasn't handled properly (it assumed $1 contains the daemon name when at that time it acutally contained the "--all" option). Plus, "--all" wasn't actually necessary, because we already passed "--reallyall" from all_stop to daemon_stop after the daemon name. So remove "--all" again and simply check for "--reallyall" in $2. This should *really* fix #11317. Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
Diffstat (limited to 'tools')
-rwxr-xr-x[-rw-r--r--]tools/frrcommon.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in
index 8ae81bc64..e5286d14f 100644..100755
--- a/tools/frrcommon.sh.in
+++ b/tools/frrcommon.sh.in
@@ -195,7 +195,7 @@ daemon_stop() {
is_user_root || exit 1
all=false
- [ "$1" = "--all" ] && { all=true; shift; }
+ [ "$2" = "--reallyall" ] && all=true
pidfile="$V_PATH/$daemon${inst:+-$inst}.pid"
vtyfile="$V_PATH/$daemon${inst:+-$inst}.vty"
@@ -277,7 +277,7 @@ all_stop() {
done
for dmninst in $reversed; do
- daemon_stop --all "$dmninst" "$1" &
+ daemon_stop "$dmninst" "$1" &
pids="$pids $!"
done
for pid in $pids; do