summaryrefslogtreecommitdiff
path: root/tools/frrcommon.sh.in
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-03-24 15:52:02 +0100
committerDavid Lamparter <equinox@diac24.net>2019-03-24 15:53:43 +0100
commitb7862d93ae2662d4dd2d4dd0de7232f4dc36924e (patch)
tree1d3c071a3c20698cfbd23b03d0d57752015ac248 /tools/frrcommon.sh.in
parent81b834a59d314094552468091feb70d7bd01ff8d (diff)
tools/frrcommon.sh: ignore 'declare' failures
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>
Diffstat (limited to 'tools/frrcommon.sh.in')
-rw-r--r--tools/frrcommon.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in
index 76a0d617ba..897e6d6558 100644
--- a/tools/frrcommon.sh.in
+++ b/tools/frrcommon.sh.in
@@ -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."