lantiq: detect board in preinit state

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41638
This commit is contained in:
John Crispin 2014-07-14 07:38:52 +00:00
parent 7e0e5110bc
commit c8bde9da4a
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