20 lines
367 B
Plaintext
Raw Normal View History

2018-09-07 13:43:55 +08:00
# Copyright (C) 2012-2015 OpenWrt.org
move_config() {
local partdev
. /lib/upgrade/common.sh
2021-06-15 17:58:07 +08:00
if export_bootdevice && export_partdevice partdev 1; then
2018-09-07 13:43:55 +08:00
if mount -t vfat -o rw,noatime "/dev/$partdev" /mnt; then
2021-06-15 17:58:07 +08:00
if [ -f "/mnt/$BACKUP_FILE" ]; then
mv -f "/mnt/$BACKUP_FILE" /
2018-09-07 13:43:55 +08:00
fi
umount /mnt
fi
fi
}
boot_hook_add preinit_mount_root move_config