diff options
author | Martin Winter <mwinter@opensourcerouting.org> | 2017-04-20 03:41:45 +0200 |
---|---|---|
committer | Martin Winter <mwinter@opensourcerouting.org> | 2017-04-20 03:41:45 +0200 |
commit | 6dc47763f4e54cb38bf611cac1594d1127389fad (patch) | |
tree | 3ced58cadff28a5de7c3c0f1091e32be517f8c31 /redhat | |
parent | redhat: fix duplicate Requires: line in spec file (diff) | |
download | frr-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-x | redhat/frr.init | 12 |
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 $? |