brcm47xx: verify also standard TRX images during sysupgrade
[openwrt.git] / target / linux / brcm47xx / base-files / lib / upgrade / platform.sh
index a4918c3..9b21e31 100644 (file)
@@ -119,6 +119,10 @@ platform_check_image() {
                        fi
                ;;
                "trx")
+                       if ! otrx -c "$1"; then
+                               echo "Invalid (corrupted?) TRX firmware"
+                               error=1
+                       fi
                ;;
                *)
                        echo "Invalid image type. Please use only .trx files"