diff options
| author | David Lamparter <equinox@diac24.net> | 2019-03-24 15:52:02 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2019-03-24 15:53:43 +0100 |
| commit | b7862d93ae2662d4dd2d4dd0de7232f4dc36924e (patch) | |
| tree | 1d3c071a3c20698cfbd23b03d0d57752015ac248 /tools/frrcommon.sh.in | |
| parent | 81b834a59d314094552468091feb70d7bd01ff8d (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.in | 2 |
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." |
