Author: rmilecki
Date: 2015-04-09 07:36:16 +0200 (Thu, 09 Apr 2015)
New Revision: 45318

Modified:
   trunk/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
Log:
brcm47xx: verify also standard TRX images during sysupgrade

It allows detecting data corruption for plain TRX as well.

Signed-off-by: Rafa?\197?\130 Mi?\197?\130ecki <[email protected]>

Modified: trunk/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
===================================================================
--- trunk/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh      
2015-04-09 05:22:10 UTC (rev 45317)
+++ trunk/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh      
2015-04-09 05:36:16 UTC (rev 45318)
@@ -119,6 +119,10 @@
                        fi
                ;;
                "trx")
+                       if ! otrx -c "$1"; then
+                               echo "Invalid (corrupted?) TRX firmware"
+                               error=1
+                       fi
                ;;
                *)
                        echo "Invalid image type. Please use only .trx files"
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to