Skip to content

Commit

Permalink
[warm reboot] unload kexec before rebooting and when error exiting fr…
Browse files Browse the repository at this point in the history
…om warm boot (#383)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
  • Loading branch information
yxieca authored and lguohan committed Nov 20, 2018
1 parent e3e82b1 commit 1879fd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ WARM_DIR=/host/warmboot
function clear_warm_boot()
{
config warm_restart disable || /bin/true
/sbin/kexec -u || /bin/true

TIMESTAMP=`date +%Y%m%d-%H%M%S`
if [[ -f ${WARM_DIR}/config_db.json ]]; then
Expand Down
1 change: 1 addition & 0 deletions scripts/reboot
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function clear_warm_boot()
if [[ -f ${WARM_DIR}/config_db.json ]]; then
mv -f ${WARM_DIR}/config_db.json ${WARM_DIR}/config_db-${TIMESTAMP}.json
fi
/sbin/kexec -u || /bin/true
}

# Exit if not superuser
Expand Down

0 comments on commit 1879fd0

Please sign in to comment.