Switch Marvell Orion CPU to kernel 2.6.32 plus LED support for all LEDs
[openwrt/svn-archive/archive.git] / target / linux / orion / base-files / etc / uci-defaults / hardware
1 #!/bin/sh
2 #
3 # Copyright (C) 2010 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 #
10 # This script sets system defaults for the hardware on firstboot
11 #
12
13 local hardware=`sed -n /Hardware/s/.*:.//p /proc/cpuinfo`
14
15 wrt350nv2_default() {
16 # leds
17 uci batch <<__EOF
18 set system.power_led=led
19 set system.power_led.name='Power LED (green)'
20 set system.power_led.sysfs='wrt350nv2:green:power'
21 set system.power_led.default='1'
22 set system.wifi_led=led
23 set system.wifi_led.name='Wireless LED (green)'
24 set system.wifi_led.sysfs='wrt350nv2:green:wireless'
25 set system.wifi_led.trigger='netdev'
26 set system.wifi_led.dev='wlan0'
27 set system.wifi_led.mode='link tx rx'
28 set system.wifi_led.default='0'
29 commit system
30 __EOF
31 }
32
33 case "${hardware}" in
34 'Linksys WRT350N v2')
35 wrt350nv2_default
36 ;;
37 esac