Skip to content

Commit

Permalink
[syncd_init_common.sh] fix fast reboot backwards compatibility (sonic…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
stepanblyschak authored and qiluo-msft committed Jun 26, 2019
1 parent 82e908e commit 610048b
Showing 1 changed file with 5 additions and 7 deletions.
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
*SONIC_BOOT_TYPE=fastfast*)
if [ -e /var/warmboot/warm-starting ]; then
FASTFAST_REBOOT='yes'
fi
;;
*SONIC_BOOT_TYPE=fast*|fast-reboot*)
FAST_REBOOT='yes'
;;
*)
FAST_REBOOT='no'
FASTFAST_REBOOT='no'
Expand Down

0 comments on commit 610048b

Please sign in to comment.