diff options
author | Jo-Philipp Wich <jo@mein.io> | 2016-05-24 12:07:02 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-05-24 13:30:58 +0200 |
commit | 1012701014bd944197031a3c0023527861b521b4 (patch) | |
tree | 6ef4087afd0ce664dba35e75376526152075b4e1 /target/linux/x86/base-files/lib/preinit | |
parent | 3193053df7d27bde82fbcc310e4404cc43f39313 (diff) | |
download | upstream-1012701014bd944197031a3c0023527861b521b4.tar.gz upstream-1012701014bd944197031a3c0023527861b521b4.tar.bz2 upstream-1012701014bd944197031a3c0023527861b521b4.zip |
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>
Diffstat (limited to 'target/linux/x86/base-files/lib/preinit')
-rw-r--r-- | target/linux/x86/base-files/lib/preinit/79_move_config | 6 |
1 files changed, 4 insertions, 2 deletions
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 |