AK3: fix partition detection taking first match on older devices
- `test -e` could fail due to unexpanded *'s in $target
This commit is contained in:
1 file changed
+4
-2
+4
-2
@@ -678,7 +678,9 @@ setup_ak() {
|
||||
else
|
||||
abort "Unable to determine mtd $block partition. Aborting...";
|
||||
fi;
|
||||
target=/dev/mtd/$mtdname;
|
||||
if [ -e /dev/mtd/$mtdname ]; then
|
||||
target=/dev/mtd/$mtdname;
|
||||
fi;
|
||||
elif [ -e /dev/block/by-name/$part ]; then
|
||||
target=/dev/block/by-name/$part;
|
||||
elif [ -e /dev/block/bootdevice/by-name/$part ]; then
|
||||
@@ -690,7 +692,7 @@ setup_ak() {
|
||||
elif [ -e /dev/$part ]; then
|
||||
target=/dev/$part;
|
||||
fi;
|
||||
test -e "$target" && break 2;
|
||||
test "$target" && break 2;
|
||||
done;
|
||||
done;
|
||||
if [ "$target" ]; then
|
||||
|
||||
Reference in new issue
Block a user