[Mellanox] platform_reboot - sync & umount fs before power cycle (#3430)

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
This commit is contained in:
Mykola F 2019-09-17 19:38:30 +03:00 committed by lguohan
parent a62ab7890e
commit 124b26d72f

View File

@ -19,6 +19,14 @@ function ParseArguments() {
done done
} }
function SafePwrCycle() {
sync ; sync
umount -fa > /dev/null 2&>1
echo 1 > $SYSFS_PWR_CYCLE
sleep 3
echo 0 > $SYSFS_PWR_CYCLE
}
ParseArguments "$@" ParseArguments "$@"
${FW_UPGRADE_SCRIPT} --upgrade --verbose ${FW_UPGRADE_SCRIPT} --upgrade --verbose
@ -32,7 +40,4 @@ if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
fi fi
fi fi
# perform "hardware" reboot SafePwrCycle
echo 1 > $SYSFS_PWR_CYCLE
sleep 3
echo 0 > $SYSFS_PWR_CYCLE