X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fbase-files%2Flib%2Fupgrade%2Fplatform.sh;h=067fe033fa852c34c75c216fb9100e7eccc221d5;hp=0b867c0052335df0be9f945ec27a0beeb17bc9c2;hb=67c3e0bf7e5148a91205d280d4029b32dcc9b6e0;hpb=25feec0c9c6a2bd9fe4c20e3cfe55e47c3d4bfaf diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 0b867c0052..067fe033fa 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -64,6 +64,7 @@ platform_do_upgrade_combined() { platform_check_image() { local board=$(ar71xx_board_name) local magic="$(get_magic_word "$1")" + local magic_long="$(get_magic_long "$1")" [ "$ARGC" -gt 1 ] && return 1 @@ -83,7 +84,14 @@ platform_check_image() { return 0 ;; wndr3700) - [ "$magic" != "3337" ] && { + [ "$magic_long" != "33373030" ] && { + echo "Invalid image type." + return 1 + } + return 0 + ;; + wndr3700v2) + [ "$magic_long" != "33373031" ] && { echo "Invalid image type." return 1 }