treewide: use only board_name function to get name
[openwrt/openwrt.git] / target / linux / orion / generic / base-files / lib / upgrade / platform.sh
index 9c9967e4afbb1397e34540d774531061ad178340..db2330684d267ce7d23cce1c837b97802627de73 100644 (file)
@@ -8,7 +8,7 @@
 platform_check_image() {
        [ "${ARGC}" -gt 1 ] && { echo 'Too many arguments. Only flash file expected.'; return 1; }
 
-       local hardware=`sed -n /Hardware/s/.*:.//p /proc/cpuinfo`
+       local hardware="$(board_name)"
        local magic="$(get_magic_word "$1")"
        local magic_long="$(get_magic_long "$1")"