aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-01-26 11:33:42 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-01-26 11:33:42 +0000
commit19622693b30b2deeab587aa001d749222b063121 (patch)
tree433ca8cae020cd35d3f29629e26bd35dd9ba5eb7 /target
parenteaa763410fbd4815eab137444af24a05d72aec58 (diff)
downloadupstream-19622693b30b2deeab587aa001d749222b063121.tar.gz
upstream-19622693b30b2deeab587aa001d749222b063121.tar.bz2
upstream-19622693b30b2deeab587aa001d749222b063121.zip
x86/soekris: Add script to detect soekris model
Add script to detect soekris board of net4801 and net4826. Patch from: kentarou matsuyama <matsuyama@thinktube.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25102 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/x86/base-files/lib/soekris.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/x86/base-files/lib/soekris.sh b/target/linux/x86/base-files/lib/soekris.sh
new file mode 100755
index 0000000000..e416ad3962
--- /dev/null
+++ b/target/linux/x86/base-files/lib/soekris.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+net48xx_board_name () {
+ local name
+ local pci=`wc -l /proc/bus/pci/devices`
+
+ case "$pci" in
+ *"8"*)
+ name="net4826"
+ ;;
+ *1[0-4]*)
+ name="net4801"
+ ;;
+ *)
+ name="net4826"
+ ;;
+ esac
+ echo $name
+}