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)
committerFelix Fietkau <nbd@nbd.name>
Wed, 22 Mar 2017 10:43:21 +0000 (11:43 +0100)
It is only used there

Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/lantiq/base-files/lib/functions/lantiq.sh
target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh

index 630832e512ce0b8c759c3775951a92fa8c5800b0..89f194b39e08557cdc76f45423c9747af4b9f5b6 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 6d4bd67af531a6ae6c9d727ed9e6deeba6666bd9..aef946036eb1613b2da609805c64b5189d5780a7 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