summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
authorMartin Winter <mwinter@opensourcerouting.org>2017-04-20 03:41:45 +0200
committerMartin Winter <mwinter@opensourcerouting.org>2017-04-20 03:41:45 +0200
commit6dc47763f4e54cb38bf611cac1594d1127389fad (patch)
tree3ced58cadff28a5de7c3c0f1091e32be517f8c31 /redhat
parentredhat: fix duplicate Requires: line in spec file (diff)
downloadfrr-6dc47763f4e54cb38bf611cac1594d1127389fad.tar.xz
frr-6dc47763f4e54cb38bf611cac1594d1127389fad.zip
redhat: redirect reload function in frr init script to restart if reload script is not installed (fixes systemctl restart)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'redhat')
-rwxr-xr-xredhat/frr.init12
1 files changed, 10 insertions, 2 deletions
diff --git a/redhat/frr.init b/redhat/frr.init
index c8c0cee40..ba3731e77 100755
--- a/redhat/frr.init
+++ b/redhat/frr.init
@@ -523,9 +523,17 @@ 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 "frr-reload script not installed - Executing full restart instead"
+ $0 restart
+ exit $?
+ 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
+ if [ ! -r $NEW_CONFIG_FILE ]; then
+ echo "Unable to read configuration file $NEW_CONFIG_FILE. Only supporting integrated config - Executing full restart instead"
+ $0 restart
+ exit $?
+ fi
echo "Applying only incremental changes to running configuration from frr.conf"
"$RELOAD_SCRIPT" --reload /etc/frr/frr.conf
exit $?