mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
lantiq: move lantiq_board_detect() to 03_preinit_board.sh
It is only used there
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit aa95d6cd20
)
This commit is contained in:
parent
f173464f13
commit
0f0d742ae3
@ -1,15 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
lantiq_board_detect() {
|
||||
name=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g"`
|
||||
model=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/.* - \(.*\)/\1/g"`
|
||||
[ -z "$name" ] && name="unknown"
|
||||
[ -z "$model" ] && model="unknown"
|
||||
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
|
||||
echo $name > /tmp/sysinfo/board_name
|
||||
echo $model > /tmp/sysinfo/model
|
||||
}
|
||||
|
||||
lantiq_board_model() {
|
||||
local model
|
||||
|
||||
|
@ -1,5 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
lantiq_board_detect() {
|
||||
name=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g"`
|
||||
model=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/.* - \(.*\)/\1/g"`
|
||||
[ -z "$name" ] && name="unknown"
|
||||
[ -z "$model" ] && model="unknown"
|
||||
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
|
||||
echo $name > /tmp/sysinfo/board_name
|
||||
echo $model > /tmp/sysinfo/model
|
||||
}
|
||||
|
||||
do_lantiq() {
|
||||
. /lib/functions/lantiq.sh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user