2012-06-19 22:36:53 +00:00
|
|
|
#!/bin/sh
|
2015-03-24 10:08:12 +00:00
|
|
|
# Copyright (C) 2012-2015 OpenWrt.org
|
2012-06-19 22:36:53 +00:00
|
|
|
|
|
|
|
move_config() {
|
2016-05-24 10:07:02 +00:00
|
|
|
local partdev
|
|
|
|
|
2016-12-31 17:06:37 +00:00
|
|
|
. /lib/upgrade/common.sh
|
2012-06-19 22:36:53 +00:00
|
|
|
|
2016-12-31 17:06:37 +00:00
|
|
|
if export_bootdevice && export_partdevice partdev 1; then
|
2017-05-05 03:56:10 +00:00
|
|
|
mkdir -p /boot
|
2018-11-20 16:20:40 +00:00
|
|
|
mount -t ext4 -o rw,noatime "/dev/$partdev" /boot
|
2019-09-04 14:57:39 +00:00
|
|
|
if [ -f "/boot/$BACKUP_FILE" ]; then
|
|
|
|
mv -f "/boot/$BACKUP_FILE" /
|
2016-12-31 17:06:29 +00:00
|
|
|
fi
|
2018-11-28 19:44:21 +00:00
|
|
|
mount --bind /boot/boot /boot
|
2015-03-24 10:08:12 +00:00
|
|
|
fi
|
2012-06-19 22:36:53 +00:00
|
|
|
}
|
|
|
|
|
2014-03-21 15:55:07 +00:00
|
|
|
boot_hook_add preinit_mount_root move_config
|