From dd7d81eb01d186111ff6f3b18305f373f209874a Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Tue, 25 Jun 2019 09:57:17 +0300 Subject: [PATCH 1/2] [syncd_init_common.sh] fix fast reboot backwards compatibility We should handle both cases for backward-compatible with 201803: - fast-reboot - SONIC_BOOT_TYPE=fast-reboot Signed-off-by: Stepan Blyschak --- syncd/scripts/syncd_init_common.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/syncd/scripts/syncd_init_common.sh b/syncd/scripts/syncd_init_common.sh index 7059bda52..28db08666 100755 --- a/syncd/scripts/syncd_init_common.sh +++ b/syncd/scripts/syncd_init_common.sh @@ -24,17 +24,15 @@ fi # Use temporary view between init and apply CMD_ARGS+=" -u" -BOOT_TYPE="$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" - -case "$BOOT_TYPE" in - fast-reboot) - FAST_REBOOT='yes' - ;; - fastfast) +case "$(cat /proc/cmdline)" in + *fastfast*) if [ -e /var/warmboot/warm-starting ]; then FASTFAST_REBOOT='yes' fi ;; + *fast*) + FAST_REBOOT='yes' + ;; *) FAST_REBOOT='no' FASTFAST_REBOOT='no' From 057d180d931453c2a9b6a2150fe426d9aa19eca3 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Wed, 26 Jun 2019 02:14:28 +0300 Subject: [PATCH 2/2] handle review comments Signed-off-by: Stepan Blyschak --- 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 28db08666..4a976f81a 100755 --- a/syncd/scripts/syncd_init_common.sh +++ b/syncd/scripts/syncd_init_common.sh @@ -25,12 +25,12 @@ fi CMD_ARGS+=" -u" case "$(cat /proc/cmdline)" in - *fastfast*) + *SONIC_BOOT_TYPE=fastfast*) if [ -e /var/warmboot/warm-starting ]; then FASTFAST_REBOOT='yes' fi ;; - *fast*) + *SONIC_BOOT_TYPE=fast*|fast-reboot*) FAST_REBOOT='yes' ;; *)