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