[Mellanox] platform_reboot - sync & umount fs before power cycle (#3430)
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
This commit is contained in:
parent
a62ab7890e
commit
124b26d72f
@ -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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user