aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorThibaut VARENE <hacks@slashdirt.org>2017-02-11 11:10:37 +0100
committerJo-Philipp Wich <jo@mein.io>2017-03-01 20:37:36 +0100
commitcff47cacd15a50f981689038fc154faf3d383abf (patch)
tree22d297209f335ad4f856acdb4ac2bf9c8e2afeed /target/linux
parente1e9d27655bd0fd93dd09f3de907a03c96c59f55 (diff)
downloadupstream-cff47cacd15a50f981689038fc154faf3d383abf.tar.gz
upstream-cff47cacd15a50f981689038fc154faf3d383abf.tar.bz2
upstream-cff47cacd15a50f981689038fc154faf3d383abf.zip
ar71xx: fix platform_find_rootfspart()
platform_find_rootfspart() fails if the kernel partition comes before the rootfs partition. The proposed patch fixes this while preserving what I understand was the original idea: stop at first match. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index a16812ca91..4f479ce858 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -46,7 +46,7 @@ platform_find_kernelpart() {
platform_find_rootfspart() {
local part
for part in "${1%:*}" "${1#*:}"; do
- [ "$part" != "$2" ] && echo "$part"; break
+ [ "$part" != "$2" ] && echo "$part" && break
done
}