summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArthur Jones <arthur.jones@riverbed.com>2018-08-01 18:22:52 +0200
committerArthur Jones <arthur.jones@riverbed.com>2018-08-01 18:23:55 +0200
commit8b5f787e8ea763d826e42ae007bdb48bece764ac (patch)
tree210fc614405f1b9b4c00695db9f483fb6a8e123b /tools
parentMerge pull request #2766 from lyq140/branch1 (diff)
downloadfrr-8b5f787e8ea763d826e42ae007bdb48bece764ac.tar.xz
frr-8b5f787e8ea763d826e42ae007bdb48bece764ac.zip
tools/frr: make frr reload error message clearer on missing frr-reload.py
Only frr-reload.py pulls in a python depenedency for frr, we can reduce the size of the base frr package by a lot if we separate out frr-pythontools. When we do this, we get a somewhat cryptic error message when frr-reload.py is missing on frr reload. Here, we pull the error message from frr-reload script, which is much clearer. Testing done: frr reload both with and without the frr-reload.py script, see the frr-reload message when missing and it runs frr-reload.py when not missing. Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/frr6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/frr b/tools/frr
index 7d7b97433..43aa2954a 100755
--- a/tools/frr
+++ b/tools/frr
@@ -574,7 +574,11 @@ case "$1" in
reload)
# Just apply the commands that have changed, no restart necessary
- [ ! -x "$RELOAD_SCRIPT" ] && echo "frr-reload script not available" && exit 0
+ if [ ! -x "$RELOAD_SCRIPT" ]; then
+ echo "Please install frr-pythontools package. Required for reload"
+ exit 0
+ fi
+
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"