Skip to content

Commit

Permalink
tools/frrcommon.sh: ignore 'declare' failures
Browse files Browse the repository at this point in the history
The "declare -p watchfrr_options" call is just to support backwards
compatibility.  If it fails, silently ignore that.

Signed-off-by: David Lamparter <equinox@diac24.net>
  • Loading branch information
eqvinox committed Mar 24, 2019
1 parent 81b834a commit b7862d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/frrcommon.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ load_old_config "$C_PATH/daemons.conf"
load_old_config "/etc/default/frr"
load_old_config "/etc/sysconfig/frr"

if declare -p watchfrr_options | grep -q '^declare \-a'; then
if { declare -p watchfrr_options 2>/dev/null || true; } | grep -q '^declare \-a'; then
log_warning_msg "watchfrr_options contains a bash array value." \
"The configured value is intentionally ignored since it is likely wrong." \
"Please remove or fix the setting."
Expand Down

0 comments on commit b7862d9

Please sign in to comment.