aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/lib
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2011-11-12 23:40:16 +0000
committerJohn Crispin <john@openwrt.org>2011-11-12 23:40:16 +0000
commit832e02cd7738b6fa0e82a804b04fd8f44589c66f (patch)
treee1f354feb218606f8536965809b830f017ad2309 /target/linux/lantiq/base-files/lib
parent5dcbbf0160f1a619a1391df6477c2bfc0e92bde1 (diff)
downloadupstream-832e02cd7738b6fa0e82a804b04fd8f44589c66f.tar.gz
upstream-832e02cd7738b6fa0e82a804b04fd8f44589c66f.tar.bz2
upstream-832e02cd7738b6fa0e82a804b04fd8f44589c66f.zip
lantiq: add /lib/lantiq.sh and make hotplug handlers use it
SVN-Revision: 29003
Diffstat (limited to 'target/linux/lantiq/base-files/lib')
-rw-r--r--target/linux/lantiq/base-files/lib/lantiq.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/lib/lantiq.sh b/target/linux/lantiq/base-files/lib/lantiq.sh
new file mode 100644
index 0000000000..75e8ac272b
--- /dev/null
+++ b/target/linux/lantiq/base-files/lib/lantiq.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+lantiq_soc_name() {
+ grep ^system /proc/cpuinfo | sed "s/system type.*: \(.*\)/\1/g"
+}
+
+lantiq_board_name() {
+ grep ^machine /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g"
+}