aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-07-14 07:38:52 +0000
committerJohn Crispin <blogic@openwrt.org>2014-07-14 07:38:52 +0000
commit7cd8da5c84da6ebcc1348a372c80d14472327e4f (patch)
tree496a9ca306109b2479a5267ae16279597c54adc1 /target/linux/lantiq/base-files
parent5c2141fb9dfc4d3ead25a81abf37660b44d7ebd7 (diff)
downloadupstream-7cd8da5c84da6ebcc1348a372c80d14472327e4f.tar.gz
upstream-7cd8da5c84da6ebcc1348a372c80d14472327e4f.tar.bz2
upstream-7cd8da5c84da6ebcc1348a372c80d14472327e4f.zip
lantiq: detect board in preinit state
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41638 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/base-files')
-rw-r--r--target/linux/lantiq/base-files/lib/functions/lantiq.sh2
-rwxr-xr-xtarget/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh9
2 files changed, 9 insertions, 2 deletions
diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq.sh b/target/linux/lantiq/base-files/lib/functions/lantiq.sh
index f02edbcbb1..88da794ca9 100644
--- a/target/linux/lantiq/base-files/lib/functions/lantiq.sh
+++ b/target/linux/lantiq/base-files/lib/functions/lantiq.sh
@@ -13,7 +13,6 @@ 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"
@@ -23,7 +22,6 @@ 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"
diff --git a/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh b/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
new file mode 100755
index 0000000000..6d4bd67af5
--- /dev/null
+++ b/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+do_lantiq() {
+ . /lib/functions/lantiq.sh
+
+ lantiq_board_detect
+}
+
+boot_hook_add preinit_main do_lantiq