openwrt/target/linux/sunxi/base-files/etc/board.d/01_leds
Piotr Jurkiewicz 75401550c3 sunxi: fix board.d/01_leds permissions and drop include
The file lacks executable permissions, which makes it not being applied
during the first boot.

While at it, drop unneeded include.

Signed-off-by: Piotr Jurkiewicz <piotr.jerzy.jurkiewicz@gmail.com>
[do not touch board name handling, update commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-12 17:18:26 +01:00

20 lines
309 B
Bash
Executable File

#!/bin/sh
. /lib/functions/uci-defaults.sh
board=$(board_name)
boardname="${board##*,}"
board_config_update
case $board in
friendlyarm,nanopi-r1)
ucidef_set_led_netdev "wan" "WAN" "nanopi:green:wan" "eth0"
ucidef_set_led_netdev "lan" "LAN" "nanopi:green:lan" "eth1"
;;
esac
board_config_flush
exit 0