From 6dc47763f4e54cb38bf611cac1594d1127389fad Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Wed, 19 Apr 2017 18:41:45 -0700 Subject: [PATCH] redhat: redirect reload function in frr init script to restart if reload script is not installed (fixes systemctl restart) Signed-off-by: Martin Winter --- redhat/frr.init | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 $? -- 2.39.5