From ee0518724bbe30fcd5c3ef6869e63ea1499654a1 Mon Sep 17 00:00:00 2001 From: shi-su Date: Fri, 21 Aug 2020 22:24:27 +0000 Subject: [PATCH] Add synchronous switch controlled by CONFIG_DB --- syncd/scripts/syncd_init_common.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/syncd/scripts/syncd_init_common.sh b/syncd/scripts/syncd_init_common.sh index 725db8953..3e1b73987 100755 --- a/syncd/scripts/syncd_init_common.sh +++ b/syncd/scripts/syncd_init_common.sh @@ -24,6 +24,12 @@ fi # Use temporary view between init and apply CMD_ARGS+=" -u" +# Set synchronous mode if it is enabled in CONFIG_DB +SYNC_MODE=$(sonic-cfggen -d -v DEVICE_METADATA.localhost.synchronous_mode) +if [ "$SYNC_MODE" == "enable" ]; then + CMD_ARGS+=" -s" +fi + case "$(cat /proc/cmdline)" in *SONIC_BOOT_TYPE=fastfast*) if [ -e /var/warmboot/warm-starting ]; then