lantiq: generate /tmp/sysinfo/lantiq_board_name if missing
authorJohn Crispin <john@openwrt.org>
Thu, 10 Jul 2014 19:16:43 +0000 (19:16 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 10 Jul 2014 19:16:43 +0000 (19:16 +0000)
Run lantiq_board_detect from lantiq_board_name and lantiq_board_model.

This was the one thing missing from r41474 for sysupgrade board
detection to work properly.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>
SVN-Revision: 41567

target/linux/lantiq/base-files/lib/functions/lantiq.sh

index 88da794ca9df17f60f75755b5bd2667352ae68bb..f02edbcbb101f5be1d906e2b2fc990a546a68a7f 100644 (file)
@@ -13,6 +13,7 @@ lantiq_board_detect() {
 lantiq_board_model() {
        local model
 
+       [ -f /tmp/sysinfo/model ] || lantiq_board_detect
        [ -f /tmp/sysinfo/model ] && model=$(cat /tmp/sysinfo/model)
        [ -z "$model" ] && model="unknown"
 
@@ -22,6 +23,7 @@ lantiq_board_model() {
 lantiq_board_name() {
        local name
 
+       [ -f /tmp/sysinfo/board_name ] || lantiq_board_detect
        [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
        [ -z "$name" ] && name="unknown"