ramips: simplify uci-defaults/network script
[openwrt.git] / target / linux / ramips / base-files / etc / uci-defaults / leds
1 #!/bin/sh
2
3 . /lib/ramips.sh
4
5 set_usb_led() {
6 local sysfs="$1"
7
8 uci batch <<EOF
9 set system.usb_led=led
10 set system.usb_led.name='usb'
11 set system.usb_led.sysfs='$sysfs'
12 set system.usb_led.trigger='usbdev'
13 set system.usb_led.dev='1-1'
14 set system.usb_led.interval='50'
15 commit system
16 EOF
17 }
18
19 board=$(ramips_board_name)
20
21 case $board in
22 bc2)
23 set_usb_led "bc2:blue:usb"
24 ;;
25 fonera20n)
26 set_usb_led "fonera20n:amber:usb"
27 ;;
28 hw550-3g)
29 set_usb_led "hw550-3g:green:usb"
30 ;;
31 mofi3500-3gn)
32 set_usb_led "mofi3500-3gn:green:usb"
33 ;;
34 nw718)
35 set_usb_led "nw718:amber:usb"
36 ;;
37 esac
This page took 0.046615 seconds and 5 git commands to generate.