summaryrefslogtreecommitdiffstats
path: root/target/linux/cns21xx/base-files/lib/cns21xx.sh
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/cns21xx/base-files/lib/cns21xx.sh')
-rwxr-xr-xtarget/linux/cns21xx/base-files/lib/cns21xx.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/cns21xx/base-files/lib/cns21xx.sh b/target/linux/cns21xx/base-files/lib/cns21xx.sh
new file mode 100755
index 000000000..c10f6d38c
--- /dev/null
+++ b/target/linux/cns21xx/base-files/lib/cns21xx.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+
+get_board_name() {
+ local hardware
+ local name
+
+ hardware=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /Hardware/ {print $2}' /proc/cpuinfo)
+
+ case "$hardware" in
+ *NSB3AST)
+ name="nsb3ast"
+ ;;
+ "NS-K330 NAS")
+ name="ns-k330"
+ ;;
+ *)
+ name="generic"
+ ;;
+ esac
+
+ echo $name
+}