diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot index 6e02d011f82..28c5aedc4e3 100755 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot @@ -19,6 +19,14 @@ function ParseArguments() { done } +function SafePwrCycle() { + sync ; sync + umount -fa > /dev/null 2&>1 + echo 1 > $SYSFS_PWR_CYCLE + sleep 3 + echo 0 > $SYSFS_PWR_CYCLE +} + ParseArguments "$@" ${FW_UPGRADE_SCRIPT} --upgrade --verbose @@ -32,6 +40,4 @@ if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then fi fi -echo 1 > $SYSFS_PWR_CYCLE -sleep 3 -echo 0 > $SYSFS_PWR_CYCLE +SafePwrCycle