lantiq: detect board in preinit state
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41638
This commit is contained in:
parent
7e0e5110bc
commit
c8bde9da4a
2 changed files with 9 additions and 2 deletions
|
@ -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"
|
||||
|
||||
|
|
9
target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
Executable file
9
target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
do_lantiq() {
|
||||
. /lib/functions/lantiq.sh
|
||||
|
||||
lantiq_board_detect
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main do_lantiq
|
Loading…
Reference in a new issue