2019-04-01 17:25:38 +00:00
|
|
|
move_config() {
|
|
|
|
local partdev
|
|
|
|
|
|
|
|
. /lib/upgrade/common.sh
|
|
|
|
|
|
|
|
if export_bootdevice && export_partdevice partdev 1; then
|
|
|
|
mkdir -p /boot
|
|
|
|
if mount -o ro,noatime "/dev/$partdev" /boot; then
|
2019-09-04 14:57:39 +00:00
|
|
|
if [ -f "/boot/$BACKUP_FILE" ]; then
|
2019-04-01 17:25:38 +00:00
|
|
|
mount /boot -o remount,rw,noatime
|
2019-09-04 14:57:39 +00:00
|
|
|
mv -f "/boot/$BACKUP_FILE" /
|
2019-04-01 17:25:38 +00:00
|
|
|
fi
|
|
|
|
umount /boot
|
|
|
|
rm -fR /boot
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
boot_hook_add preinit_mount_root move_config
|