[source] lantiq: move lantiq_board_detect() to 03_preinit_board.sh
LEDE Commits
lede-commits at lists.infradead.org
Wed Mar 22 03:43:47 PDT 2017
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/aa95d6cd20f7e08420562b9747c197c2eac1d2e2
commit aa95d6cd20f7e08420562b9747c197c2eac1d2e2
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Mar 17 16:17:42 2017 +0100
lantiq: move lantiq_board_detect() to 03_preinit_board.sh
It is only used there
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
target/linux/lantiq/base-files/lib/functions/lantiq.sh | 10 ----------
target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh | 10 ++++++++++
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq.sh b/target/linux/lantiq/base-files/lib/functions/lantiq.sh
index 630832e..89f194b 100644
--- a/target/linux/lantiq/base-files/lib/functions/lantiq.sh
+++ b/target/linux/lantiq/base-files/lib/functions/lantiq.sh
@@ -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
diff --git a/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh b/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
index 6d4bd67..aef9460 100755
--- a/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
+++ b/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
@@ -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
More information about the lede-commits
mailing list