From 4f80d59f7c6c67947081627a8a7111cdc6ffe1e1 Mon Sep 17 00:00:00 2001 From: Aryeh Feigin <101218333+arfeigin@users.noreply.github.com> Date: Fri, 10 Mar 2023 18:41:06 +0200 Subject: [PATCH] Fast reboot finalizer (#1213) Updates PR #1196 according to required fast-reboot state-db change. Update syncd_init_common to check if fast-reboot is enabled according to the new value for FAST_REBOOT entry in STATE_DB. This PR should come along with the following PRs: sonic-net/sonic-utilities#2621 sonic-net/sonic-buildimage#13484 sonic-net/sonic-swss-common#742 sonic-net/sonic-platform-daemons#335 This set of PRs solves the issue sonic-net/sonic-buildimage#13251 --- syncd/scripts/syncd_init_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncd/scripts/syncd_init_common.sh b/syncd/scripts/syncd_init_common.sh index 74ba5a2f2..c7d219af5 100644 --- a/syncd/scripts/syncd_init_common.sh +++ b/syncd/scripts/syncd_init_common.sh @@ -52,8 +52,8 @@ case "$(cat /proc/cmdline)" in ;; *SONIC_BOOT_TYPE=fast*|*fast-reboot*) # check that the key exists - SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB GET "FAST_RESTART_ENABLE_TABLE|system"` - if [[ ${SYSTEM_FAST_REBOOT} == "enable" ]]; then + SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable` + if [[ x"${SYSTEM_FAST_REBOOT}" == x"true" ]]; then FAST_REBOOT='yes' else FAST_REBOOT='no'