2016-09-26 12:02:40 +02:00
|
|
|
# Copyright (C) 2015 OpenWrt.org
|
|
|
|
|
2019-03-28 18:07:07 +01:00
|
|
|
. /lib/functions.sh
|
2019-03-28 18:07:08 +01:00
|
|
|
. /lib/upgrade/common.sh
|
2019-03-28 18:07:07 +01:00
|
|
|
|
2016-09-26 12:02:40 +02:00
|
|
|
move_config() {
|
2019-03-28 18:07:08 +01:00
|
|
|
local partdev
|
|
|
|
|
|
|
|
if export_bootdevice && export_partdevice partdev 1; then
|
2019-03-28 18:07:07 +01:00
|
|
|
case $(board_name) in
|
2019-05-11 19:37:34 +02:00
|
|
|
cznic,turris-omnia)
|
2019-03-28 18:07:07 +01:00
|
|
|
insmod nls_cp437
|
|
|
|
insmod nls_iso8859-1
|
|
|
|
insmod fat
|
|
|
|
insmod vfat
|
|
|
|
;;
|
|
|
|
esac
|
2016-09-26 12:02:40 +02:00
|
|
|
mkdir -p /boot
|
2019-03-28 18:07:08 +01:00
|
|
|
mount -o rw,noatime "/dev/$partdev" /boot
|
2019-09-04 16:57:39 +02:00
|
|
|
[ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
|
2018-01-25 00:04:56 +01:00
|
|
|
umount /boot
|
2016-09-26 12:02:40 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
boot_hook_add preinit_mount_root move_config
|