From: Martin Winter Date: Thu, 20 Apr 2017 01:41:45 +0000 (-0700) Subject: redhat: redirect reload function in frr init script to restart if reload script is... X-Git-Tag: reindent-master-before~92^2~2^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6dc47763f4e54cb38bf611cac1594d1127389fad;p=matthieu%2Ffrr.git redhat: redirect reload function in frr init script to restart if reload script is not installed (fixes systemctl restart) Signed-off-by: Martin Winter --- diff --git a/redhat/frr.init b/redhat/frr.init index c8c0cee407..ba3731e777 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 $?