Skip to content

Commit

Permalink
[kdump]: Parse sonic_platform kernel command line parameter to read t…
Browse files Browse the repository at this point in the history
…he platform identifier string (#1291)

The platform identifier string is used in the reboot script to identify
and execute any custom platform specific reboot script

Signed-off-by: Rajendra Dendukuri <rajendra.dendukuri@broadcom.com>
  • Loading branch information
rajendra-dendukuri authored Dec 13, 2020
1 parent 0603c0b commit 6255384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/reboot
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ -e $VMCORE_FILE -a -s $VMCORE_FILE ]; then
echo "We have a /proc/vmcore, then we just kdump'ed"
echo "User issued 'kdump' command [User: kdump, Time: ${REBOOT_TIME}]" > ${REBOOT_CAUSE_FILE}
sync
PLATFORM=$(grep -oP 'platform=\K\S+' /proc/cmdline)
PLATFORM=$(grep -oP 'sonic_platform=\K\S+' /proc/cmdline)
if [ ! -z "${PLATFORM}" -a -x ${DEVPATH}/${PLATFORM}/${PLAT_REBOOT} ]; then
exec ${DEVPATH}/${PLATFORM}/${PLAT_REBOOT}
fi
Expand Down

0 comments on commit 6255384

Please sign in to comment.