From 1012701014bd944197031a3c0023527861b521b4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 24 May 2016 12:07:02 +0200 Subject: 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 Signed-off-by: Jo-Philipp Wich --- target/linux/x86/base-files/lib/preinit/79_move_config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'target/linux/x86/base-files/lib/preinit/79_move_config') diff --git a/target/linux/x86/base-files/lib/preinit/79_move_config b/target/linux/x86/base-files/lib/preinit/79_move_config index 1d4873d78b..5ac81cb90d 100644 --- a/target/linux/x86/base-files/lib/preinit/79_move_config +++ b/target/linux/x86/base-files/lib/preinit/79_move_config @@ -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 -- cgit v1.2.3