Skip to content

Commit 1879fd0

Browse files
yxiecalguohan
authored andcommitted
[warm reboot] unload kexec before rebooting and when error exiting from warm boot (#383)
Signed-off-by: Ying Xie <[email protected]>
1 parent e3e82b1 commit 1879fd0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

scripts/fast-reboot

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ WARM_DIR=/host/warmboot
99
function clear_warm_boot()
1010
{
1111
config warm_restart disable || /bin/true
12+
/sbin/kexec -u || /bin/true
1213

1314
TIMESTAMP=`date +%Y%m%d-%H%M%S`
1415
if [[ -f ${WARM_DIR}/config_db.json ]]; then

scripts/reboot

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function clear_warm_boot()
2323
if [[ -f ${WARM_DIR}/config_db.json ]]; then
2424
mv -f ${WARM_DIR}/config_db.json ${WARM_DIR}/config_db-${TIMESTAMP}.json
2525
fi
26+
/sbin/kexec -u || /bin/true
2627
}
2728

2829
# Exit if not superuser

0 commit comments

Comments
 (0)