octeon: fix sysupgrade
authorStijn Tintel <stijn@linux-ipv6.be>
Sat, 30 Nov 2019 18:17:42 +0000 (20:17 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Sat, 30 Nov 2019 18:19:12 +0000 (20:19 +0200)
Sysupgrade was failing due to incorrect replacement of backticks:
/sbin/sysupgrade: /lib/upgrade/platform.sh: line 101: syntax error: missing '))'

Fixes: 0bbfc3dff719 ("octeon: replace backticks by $(...)")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
target/linux/octeon/base-files/lib/upgrade/platform.sh

index 149c2fd955c0417d3fa790458d7f1e47a44b58c6..2de0f7a47ef925a88164e438af6988c7937d547a 100755 (executable)
@@ -85,8 +85,8 @@ platform_check_image() {
        er | \
        erlite)
                local tar_file="$1"
-               local kernel_length=$((tar xf $tar_file sysupgrade-$board/kernel -O | wc -c) 2> /dev/null)
-               local rootfs_length=$((tar xf $tar_file sysupgrade-$board/root -O | wc -c) 2> /dev/null)
+               local kernel_length=$(tar xf $tar_file sysupgrade-$board/kernel -O | wc -c 2> /dev/null)
+               local rootfs_length=$(tar xf $tar_file sysupgrade-$board/root -O | wc -c 2> /dev/null)
                [ "$kernel_length" = 0 -o "$rootfs_length" = 0 ] && {
                        echo "The upgrade image is corrupt."
                        return 1