summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-03-23 20:55:14 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-03-24 19:38:46 +0200
commitc9bdc0c79e0c2a27af94349eb5010175205ee7fb (patch)
tree52be015cc92774b9fa3489f784c45b7e4de03cd1 /tools
parent6927446645221898256a6ec37653bb31a301db72 (diff)
tools: Set correct directory of vtysh for frr-reload.py
Before it was setting SDIR, which is /usr/lib/frr, but the vtysh binary is put under bindir (which is /usr/local by default). And running `/usr/lib/frr/frr reload` failed. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/frr.in3
-rwxr-xr-xtools/frrcommon.sh.in1
-rw-r--r--tools/frrinit.sh.in2
3 files changed, 4 insertions, 2 deletions
diff --git a/tools/frr.in b/tools/frr.in
index c9d48d0279..cd24a96054 100755
--- a/tools/frr.in
+++ b/tools/frr.in
@@ -17,6 +17,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
D_PATH="@CFG_SBIN@" # /usr/lib/frr
C_PATH="@CFG_SYSCONF@" # /etc/frr
V_PATH="@CFG_STATE@" # /var/run/frr
+B_PATH="@CFG_BIN@"
VTYSH="@vtysh_bin@" # /usr/bin/vtysh
FRR_USER="@enable_user@" # frr
FRR_GROUP="@enable_group@" # frr
@@ -582,7 +583,7 @@ case "$1" in
NEW_CONFIG_FILE="${2:-$C_PATH/frr.conf}"
[ ! -r $NEW_CONFIG_FILE ] && echo "Unable to read new configuration file $NEW_CONFIG_FILE" && exit 1
echo "Applying only incremental changes to running configuration from frr.conf"
- "$RELOAD_SCRIPT" --reload --bindir "$D_PATH" --confdir "$C_PATH" --rundir "$V_PATH" "$C_PATH/frr.conf"
+ "$RELOAD_SCRIPT" --reload --bindir "$B_PATH" --confdir "$C_PATH" --rundir "$V_PATH" "$C_PATH/frr.conf"
exit $?
;;
diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in
index e26c294714..f1f7011909 100755
--- a/tools/frrcommon.sh.in
+++ b/tools/frrcommon.sh.in
@@ -24,6 +24,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
D_PATH="@CFG_SBIN@" # /usr/lib/frr
C_PATH="@CFG_SYSCONF@${suffix}" # /etc/frr
V_PATH="@CFG_STATE@${suffix}" # /var/run/frr
+B_PATH="@CFG_BIN@"
VTYSH="@vtysh_bin@" # /usr/bin/vtysh
FRR_USER="@enable_user@" # frr
FRR_GROUP="@enable_group@" # frr
diff --git a/tools/frrinit.sh.in b/tools/frrinit.sh.in
index 2396b1a326..42adefb9ea 100644
--- a/tools/frrinit.sh.in
+++ b/tools/frrinit.sh.in
@@ -122,7 +122,7 @@ reload)
NEW_CONFIG_FILE="${2:-$C_PATH/frr.conf}"
[ ! -r $NEW_CONFIG_FILE ] && log_failure_msg "Unable to read new configuration file $NEW_CONFIG_FILE" && exit 1
- "$RELOAD_SCRIPT" --reload --bindir "$D_PATH" --confdir "$C_PATH" --rundir "$V_PATH" "$NEW_CONFIG_FILE" `echo $nsopt`
+ "$RELOAD_SCRIPT" --reload --bindir "$B_PATH" --confdir "$C_PATH" --rundir "$V_PATH" "$NEW_CONFIG_FILE" `echo $nsopt`
exit $?
;;