diff options
| author | Jonas Gorski <jonas.gorski@bisdn.de> | 2023-09-14 17:04:16 +0200 |
|---|---|---|
| committer | Jonas Gorski <jonas.gorski@bisdn.de> | 2023-09-14 17:20:25 +0200 |
| commit | 312d5ee1592f8c5b616d330233d1de2643f759e2 (patch) | |
| tree | 3b55832391e2f63548191e6cd41689ce4577ea93 /pathd/path_pcep_debug.c | |
| parent | 75dbd45c5570c088dc0e2cf83e1b22b0ec0a30b3 (diff) | |
tools: make --quiet actually suppress output
When calling daemon_stop() with --quiet and e.g. the pidfile is empty,
it won't return early since while "$fail" is set, "$2" is "--quiet", so
the if condition isn't met and it will continue executing, resulting
in error messages in the log:
> Sep 14 14:48:33 localhost watchfrr[2085]: [YFT0P-5Q5YX] Forked background command [pid 2086]: /usr/lib/frr/watchfrr.sh restart all
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec
Fix this by moving the --quiet check into the block to log_failure_msg(),
and also add the check to all other invocations of log_*_msg() to make
--quiet properly suppress output.
Fixes: 19a99d89f088 ("tools: suppress unuseful warnings during restarting frr")
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
Diffstat (limited to 'pathd/path_pcep_debug.c')
0 files changed, 0 insertions, 0 deletions
