diff options
author | Martin Winter <mwinter@opensourcerouting.org> | 2017-05-22 13:07:22 +0200 |
---|---|---|
committer | Martin Winter <mwinter@opensourcerouting.org> | 2017-05-22 13:07:22 +0200 |
commit | da4b95e740dcd919d054c66a084a60f0e7dcb5ef (patch) | |
tree | 768cd3086b46023b15a837c92998f09e0a964310 /redhat | |
parent | redhat: fix previous merge. initsystem detection should now work for mock bui... (diff) | |
download | frr-da4b95e740dcd919d054c66a084a60f0e7dcb5ef.tar.xz frr-da4b95e740dcd919d054c66a084a60f0e7dcb5ef.zip |
redhat: Disallow reload function for unsupported systems
Before the change, a reload triggered a restart if the python reload script wasn't installed or for non-integrated configs
With this change, the reload is rejected with an error in this case (and suggests the installation of the python script package)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'redhat')
-rwxr-xr-x | redhat/frr.init | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/redhat/frr.init b/redhat/frr.init index ba3731e77..96c0a833a 100755 --- a/redhat/frr.init +++ b/redhat/frr.init @@ -524,15 +524,13 @@ case "$1" in reload) # Just apply the commands that have changed, no restart necessary if [ ! -x "$RELOAD_SCRIPT" ]; then - echo "frr-reload script not installed - Executing full restart instead" - $0 restart - exit $? + echo "frr-reload - reload not supported. Use restart or install frr-pythontools package" + exit 1 fi NEW_CONFIG_FILE="${2:-$C_PATH/frr.conf}" 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 $? + echo "Unable to read configuration file $NEW_CONFIG_FILE. Only supporting integrated config" + exit 1 fi echo "Applying only incremental changes to running configuration from frr.conf" "$RELOAD_SCRIPT" --reload /etc/frr/frr.conf |