aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/lib
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2011-11-12 23:40:16 +0000
committerJohn Crispin <blogic@openwrt.org>2011-11-12 23:40:16 +0000
commit508789fa68b2645089e3b330ae32176c5f02f13c (patch)
tree6d5c2e14ba4fe1136e4e0ec04cd56a757edabdc7 /target/linux/lantiq/base-files/lib
parent39c1578720aac700a4a6527fb66c2192275b7905 (diff)
downloadupstream-508789fa68b2645089e3b330ae32176c5f02f13c.tar.gz
upstream-508789fa68b2645089e3b330ae32176c5f02f13c.tar.bz2
upstream-508789fa68b2645089e3b330ae32176c5f02f13c.zip
lantiq: add /lib/lantiq.sh and make hotplug handlers use it
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29003 3c298f89-4303-0410-b956-a3cf2f4a3e73
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"
+}