ramips: use get_magic_long in sysupgrade image check
authorGabor Juhos <juhosg@openwrt.org>
Thu, 18 Oct 2012 07:23:00 +0000 (07:23 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Thu, 18 Oct 2012 07:23:00 +0000 (07:23 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 33842

target/linux/ramips/base-files/lib/upgrade/platform.sh

index 5ebf42a85d02e6ac5c5405de2ac29f60604baa05..2857599d0bfd58298b179039fe0be6fb27a47541 100755 (executable)
@@ -9,7 +9,7 @@ RAMFS_COPY_DATA=/lib/ramips.sh
 
 platform_check_image() {
        local board=$(ramips_board_name)
-       local magic="$(get_magic_word "$1")"
+       local magic="$(get_magic_long "$1")"
 
        [ "$ARGC" -gt 1 ] && return 1
 
@@ -51,7 +51,7 @@ platform_check_image() {
        whr-g300n |\
        ur-336un |\
        wr512-3gn)
-               [ "$magic" != "2705" ] && {
+               [ "$magic" != "27051956" ] && {
                        echo "Invalid image type."
                        return 1
                }