From 76d59d67e62592b1519a7f42c4489dcd4a06286d Mon Sep 17 00:00:00 2001 From: osm0sis Date: Thu, 6 Jun 2019 16:04:43 -0300 Subject: [PATCH] AK3: also make mtd partition detection variables local --- tools/ak3-core.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index ebbdd28..c1fbf44 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -584,7 +584,7 @@ reset_ak() { # setup_ak setup_ak() { - local blockfiles parttype name part target; + local blockfiles parttype name part mtdmount mtdpart mtdname target; # allow multi-partition ramdisk modifying configurations (using reset_ak) if [ "$block" ] && [ ! -d "$ramdisk" -a ! -d "$patch" ]; then @@ -639,11 +639,11 @@ setup_ak() { mtdmount=$(grep -w "$part" /proc/mtd); mtdpart=$(echo $mtdmount | cut -d\" -f2); if [ "$mtdpart" == "$part" ]; then - mtd=$(echo $mtdmount | cut -d: -f1); + mtdname=$(echo $mtdmount | cut -d: -f1); else abort "Unable to determine mtd $block partition. Aborting..."; fi; - target=/dev/mtd/$mtd; + target=/dev/mtd/$mtdname; elif [ -e /dev/block/by-name/$part ]; then target=/dev/block/by-name/$part; elif [ -e /dev/block/bootdevice/by-name/$part ]; then