diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2019-01-24 18:17:40 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-02-19 21:34:31 +0100 |
commit | 3ec9556728c7fe17bb1c47e62abf75bbff29502f (patch) | |
tree | 8edbd514dcbae0913a0e344ec6d5677d75c67050 /tools | |
parent | debian: remove superseded systemd lintian override (diff) | |
download | frr-3ec9556728c7fe17bb1c47e62abf75bbff29502f.tar.xz frr-3ec9556728c7fe17bb1c47e62abf75bbff29502f.zip |
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')
-rw-r--r-- | tools/etc/frr/daemons | 2 | ||||
-rw-r--r-- | tools/frrcommon.sh.in | 9 | ||||
-rw-r--r-- | tools/frrinit.sh.in | 2 | ||||
-rw-r--r-- | tools/watchfrr.sh.in | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/tools/etc/frr/daemons b/tools/etc/frr/daemons index 2d56fe1b9..0fca54113 100644 --- a/tools/etc/frr/daemons +++ b/tools/etc/frr/daemons @@ -55,7 +55,7 @@ bfdd_options=" -A 127.0.0.1" fabricd_options="-A 127.0.0.1" # The list of daemons to watch is automatically generated by the init script. -watchfrr_options="-r '/usr/lib/frr/watchfrr.sh restart %s' -s '/usr/lib/frr/watchfrr.sh start %s' -k '/usr/lib/frr/watchfrr.sh stop %s'" +#watchfrr_options="" # for debugging purposes, you can specify a "wrap" command to start instead # of starting the daemon directly, e.g. to use valgrind on ospfd: diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in index 588aa6d10..37abfeb30 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 # diff --git a/tools/frrinit.sh.in b/tools/frrinit.sh.in index 3dddf5bd4..0f5ed8586 100644 --- a/tools/frrinit.sh.in +++ b/tools/frrinit.sh.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # ### BEGIN INIT INFO # Provides: frr diff --git a/tools/watchfrr.sh.in b/tools/watchfrr.sh.in index 3051d9104..712f962a0 100644 --- a/tools/watchfrr.sh.in +++ b/tools/watchfrr.sh.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This is NOT the init script! This is the watchfrr start/stop/restart # command handler, passed to watchfrr with the -s/-r/-k commands. It is used |