forked from Ivasoft/openwrt
x86: generalize partition discovery for sysupgrade
Generalize the partition discovery in sysupgrade in order to fix sysupgrade and config backup/recovery on MMC block devices which use a different naming scheme compared to mtdblock or sd* devices. The change also adds the find applet to the ramdisk utilities so that upgrade code can rely on it. The commit is based on the initial submission by Russell Senior at http://patchwork.ozlabs.org/patch/625440/ . Signed-off-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
# Copyright (C) 2012-2015 OpenWrt.org
|
||||
|
||||
move_config() {
|
||||
local partdev
|
||||
|
||||
. /lib/upgrade/platform.sh
|
||||
|
||||
if platform_export_bootpart; then
|
||||
mount -t ext4 -o rw,noatime "$BOOTPART" /mnt
|
||||
if platform_export_bootdevice && platform_export_partdevice partdev 1; then
|
||||
mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt
|
||||
mv -f /mnt/sysupgrade.tgz /
|
||||
umount /mnt
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user