Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[syncd_init_common.sh] fix fast reboot backwards compatibility #480

Merged
merged 2 commits into from
Jun 26, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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*)
Copy link
Contributor

@qiluo-msft qiluo-msft Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fastfast [](start = 3, length = 8)

Be more specific SONIC_BOOT_TYPE=fastfast #Closed

if [ -e /var/warmboot/warm-starting ]; then
FASTFAST_REBOOT='yes'
fi
;;
*fast*)
Copy link
Contributor

@qiluo-msft qiluo-msft Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast [](start = 3, length = 4)

This one is also too general. We can match for 2 patterns:

  1. *SONIC_BOOT_TYPE=fast*
  2. *fast-reboot* #Closed

FAST_REBOOT='yes'
;;
*)
FAST_REBOOT='no'
FASTFAST_REBOOT='no'
Expand Down