]> git.puffer.fish Git - mirror/frr.git/commitdiff
redhat: redirect reload function in frr init script to restart if reload script is...
authorMartin Winter <mwinter@opensourcerouting.org>
Thu, 20 Apr 2017 01:41:45 +0000 (18:41 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 6 Jun 2017 18:40:15 +0000 (14:40 -0400)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
redhat/frr.init

index c8c0cee407f94698c29c1fc6ef220201149a1f22..ba3731e777ad33fbac41733a85eabf04afb034c0 100755 (executable)
@@ -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 $?