[source] ramips: unify etc/board.d/01_leds configuration

LEDE Commits lede-commits at lists.infradead.org
Wed Jul 27 22:19:29 PDT 2016


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=525b9edc8a5b88a576ce522fbb4e9f326a794581

commit 525b9edc8a5b88a576ce522fbb4e9f326a794581
Author: P.Wassi <p.wassi at gmx.at>
AuthorDate: Tue Jul 26 19:18:53 2016 +0200

    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 at gmx.at>
---
 target/linux/ramips/base-files/etc/board.d/01_leds | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 8636a46..fc69f33 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -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}"
 }
 
 



More information about the lede-commits mailing list