From: Thibaut VARENE Date: Sat, 11 Feb 2017 10:10:37 +0000 (+0100) Subject: ar71xx: fix platform_find_rootfspart() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cff47cacd15a50f981689038fc154faf3d383abf;p=openwrt%2Fstaging%2Frmilecki.git 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 --- diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index a16812ca919..4f479ce8585 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 }