From daef201a3f35b30557062c01cee68d72c23fc784 Mon Sep 17 00:00:00 2001 From: st Date: Wed, 6 Nov 2019 15:22:44 +0530 Subject: [PATCH 1/2] Fastboot/warmboot platform plugin --- scripts/fast-reboot | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index e59f3dcbb5..e1c763003b 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -13,6 +13,9 @@ STRICT=no REBOOT_METHOD="/sbin/kexec -e" ASSISTANT_IP_LIST="" ASSISTANT_SCRIPT="/usr/bin/neighbor_advertiser" +DEVPATH="/usr/share/sonic/device" +PLATFORM=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform) +PLATFORM_PLUGIN="${REBOOT_TYPE}_plugin" # Require 100M available on the hard drive for warm reboot temp files, # Size is in 1K blocks: @@ -513,6 +516,10 @@ if [ -x /sbin/hwclock ]; then /sbin/hwclock -w || /bin/true fi +if [ -x ${DEVPATH}/${PLATFORM}/${PLATFORM_PLUGIN} ]; then + debug "Running ${PLATFORM} specific plugin..." +fi + # Reboot: explicity call Linux native reboot under sbin debug "Rebooting with ${REBOOT_METHOD} to ${NEXT_SONIC_IMAGE} ..." exec ${REBOOT_METHOD} From d1c072ad70acad42534d8b3ff64c579e8f1b635a Mon Sep 17 00:00:00 2001 From: Santhosh Kumar T <53558409+santhosh-kt@users.noreply.github.com> Date: Fri, 15 Nov 2019 18:27:08 +0530 Subject: [PATCH 2/2] Added platform plugin --- scripts/fast-reboot | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index e1c763003b..f35c3126d3 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -518,6 +518,7 @@ fi if [ -x ${DEVPATH}/${PLATFORM}/${PLATFORM_PLUGIN} ]; then debug "Running ${PLATFORM} specific plugin..." + ${DEVPATH}/${PLATFORM}/${PLATFORM_PLUGIN} fi # Reboot: explicity call Linux native reboot under sbin