fix fast reboot compatibility (#3083)
* fix fast reboot compatibility We should handle both cases for backward-compatible with 201803: - fast-reboot - SONIC_BOOT_TYPE=fast-reboot * handle review comments * add a comment that getBootType code snippet is shared between two files
This commit is contained in:
parent
b92d980769
commit
6961816dec
@ -33,15 +33,15 @@ function updateHostName()
|
|||||||
|
|
||||||
function getBootType()
|
function getBootType()
|
||||||
{
|
{
|
||||||
local BOOT_TYPE
|
# same code snippet in files/scripts/syncd.sh
|
||||||
case "$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" in
|
case "$(cat /proc/cmdline)" in
|
||||||
warm*)
|
*SONIC_BOOT_TYPE=warm*)
|
||||||
TYPE='warm'
|
TYPE='warm'
|
||||||
;;
|
;;
|
||||||
fastfast)
|
*SONIC_BOOT_TYPE=fastfast*)
|
||||||
TYPE='fastfast'
|
TYPE='fastfast'
|
||||||
;;
|
;;
|
||||||
fast*)
|
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
|
||||||
TYPE='fast'
|
TYPE='fast'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -55,14 +55,15 @@ function wait_for_database_service()
|
|||||||
|
|
||||||
function getBootType()
|
function getBootType()
|
||||||
{
|
{
|
||||||
case "$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" in
|
# same code snippet in files/build_templates/docker_image_ctl.j2
|
||||||
warm*)
|
case "$(cat /proc/cmdline)" in
|
||||||
|
*SONIC_BOOT_TYPE=warm*)
|
||||||
TYPE='warm'
|
TYPE='warm'
|
||||||
;;
|
;;
|
||||||
fastfast)
|
*SONIC_BOOT_TYPE=fastfast*)
|
||||||
TYPE='fastfast'
|
TYPE='fastfast'
|
||||||
;;
|
;;
|
||||||
fast*)
|
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
|
||||||
TYPE='fast'
|
TYPE='fast'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user