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
This commit is contained in:
John Crispin
2014-07-14 07:38:52 +00:00
parent 5c2141fb9d
commit 7cd8da5c84
2 changed files with 9 additions and 2 deletions

View File

@@ -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"

View File

@@ -0,0 +1,9 @@
#!/bin/sh
do_lantiq() {
. /lib/functions/lantiq.sh
lantiq_board_detect
}
boot_hook_add preinit_main do_lantiq