1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-18 13:13:55 +02:00

ramips: unify etc/board.d/01_leds configuration

Introduce an optional parameter at the local set_usb_led and
set_wifi_led function such that they can take a triggering
device. If no parameter is passed, behaviour is unchanged.
Signed-off-by: P.Wassi <p.wassi@gmx.at>
This commit is contained in:
P.Wassi 2016-07-26 19:18:53 +02:00 committed by John Crispin
parent 42305ae24a
commit 525b9edc8a

View File

@ -4,11 +4,11 @@
. /lib/ramips.sh
set_usb_led() {
ucidef_set_led_usbdev "usb" "USB" "$1" "1-1"
ucidef_set_led_usbdev "usb" "USB" "${1}" "${2:-1-1}"
}
set_wifi_led() {
ucidef_set_led_netdev "wifi_led" "wifi" "$1" "wlan0"
ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}"
}