summaryrefslogtreecommitdiff
path: root/tools/frrcommon.sh.in
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2019-01-24 18:17:40 +0100
committerDavid Lamparter <equinox@diac24.net>2019-02-19 21:34:31 +0100
commit3ec9556728c7fe17bb1c47e62abf75bbff29502f (patch)
tree8edbd514dcbae0913a0e344ec6d5677d75c67050 /tools/frrcommon.sh.in
parentae132a9497af5fd881db897a35288382cc557b9b (diff)
watchfrr: build in defaults for -r/-s/-k
There's no good reason to not have these options default to the installation path of tools/watchfrr.sh. Doing so allows us to ditch watchfrr_options from daemons/daemons.conf completely. Fixes: #3652 Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'tools/frrcommon.sh.in')
-rw-r--r--tools/frrcommon.sh.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in
index 588aa6d103..37abfeb30d 100644
--- a/tools/frrcommon.sh.in
+++ b/tools/frrcommon.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# This is a "library" of sorts for use by the other FRR shell scripts. It
# has most of the daemon start/stop logic, but expects the following shell
@@ -288,6 +288,13 @@ 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
+ 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."
+ unset watchfrr_options
+fi
+
#
# other defaults and dispatch
#