lantiq: move lantiq_board_detect() to 03_preinit_board.sh
authorFelix Fietkau <nbd@nbd.name>
Fri, 17 Mar 2017 15:17:42 +0000 (16:17 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Dec 2017 13:54:12 +0000 (14:54 +0100)
It is only used there

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit aa95d6cd20f7e08420562b9747c197c2eac1d2e2)

target/linux/lantiq/base-files/lib/functions/lantiq.sh
target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh

index 630832e..89f194b 100644 (file)
@@ -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
 
index 6d4bd67..aef9460 100755 (executable)
@@ -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