Skip to content
Merged
Changes from all commits
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
13 changes: 9 additions & 4 deletions device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ function ParseArguments() {
done
}

function SafePwrCycle() {
sync ; sync
umount -fa > /dev/null 2&>1
Copy link
Collaborator

Choose a reason for hiding this comment

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

this looks like a generic commands for all that does the power cycle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, Note that it's the platform reboot script, so this is only for Mellanox platforms.

echo 1 > $SYSFS_PWR_CYCLE
sleep 3
echo 0 > $SYSFS_PWR_CYCLE
}

ParseArguments "$@"

${FW_UPGRADE_SCRIPT} --upgrade --verbose
Expand All @@ -32,7 +40,4 @@ if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
fi
fi

# perform "hardware" reboot
echo 1 > $SYSFS_PWR_CYCLE
sleep 3
echo 0 > $SYSFS_PWR_CYCLE
SafePwrCycle