26 lines
494 B
Plaintext
Raw Normal View History

2017-09-06 19:19:45 +08:00
# Copyright (C) 2015 OpenWrt.org
. /lib/functions.sh
. /lib/upgrade/common.sh
2017-09-06 19:19:45 +08:00
move_config() {
local partdev
if export_bootdevice && export_partdevice partdev 1; then
case $(board_name) in
cznic,turris-omnia)
insmod nls_cp437
insmod nls_iso8859-1
insmod fat
insmod vfat
;;
esac
2017-09-06 19:19:45 +08:00
mkdir -p /boot
mount -o rw,noatime "/dev/$partdev" /boot
2021-06-15 17:58:07 +08:00
[ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
2018-04-08 22:59:26 +08:00
umount /boot
2017-09-06 19:19:45 +08:00
fi
}
boot_hook_add preinit_mount_root move_config