Skip to content

Commit 610048b

Browse files
stepanblyschakqiluo-msft
authored andcommitted
[syncd_init_common.sh] fix fast reboot backwards compatibility (sonic-net#480)
* [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 * handle review comments
1 parent 82e908e commit 610048b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

syncd/scripts/syncd_init_common.sh

+5-7
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,15 @@ fi
2424
# Use temporary view between init and apply
2525
CMD_ARGS+=" -u"
2626

27-
BOOT_TYPE="$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)"
28-
29-
case "$BOOT_TYPE" in
30-
fast-reboot)
31-
FAST_REBOOT='yes'
32-
;;
33-
fastfast)
27+
case "$(cat /proc/cmdline)" in
28+
*SONIC_BOOT_TYPE=fastfast*)
3429
if [ -e /var/warmboot/warm-starting ]; then
3530
FASTFAST_REBOOT='yes'
3631
fi
3732
;;
33+
*SONIC_BOOT_TYPE=fast*|fast-reboot*)
34+
FAST_REBOOT='yes'
35+
;;
3836
*)
3937
FAST_REBOOT='no'
4038
FASTFAST_REBOOT='no'

0 commit comments

Comments
 (0)