base-files: make it possible to specify switch led mode
authorChristian Lamparter <[email protected]>
Fri, 21 Sep 2018 22:38:40 +0000 (00:38 +0200)
committerJo-Philipp Wich <[email protected]>
Tue, 18 Dec 2018 16:48:00 +0000 (17:48 +0100)
commit1aed0a3df63a7deab62a740b44e2213be8fc8146
tree0c09956137a4dc7eeb808a642ec9dacc6fcc9cfe
parentd8713ad9162c8d56c3f47c0c92a7621ad8bb36f6
base-files: make it possible to specify switch led mode

The swconfig switch led driver has the ability to switch
between a "link, rx and/or tx" mode. However, this feature
was not implemented in uci, the led init script and
config_generate.

This patch adds a seventh parameter to the
ucidef_set_led_switch() function. The accepted values for
this parameter are: link, rx and tx.
Any permutations of these three values are supported, as
long as they are properly encased with quotes.
If the parameter is not specified it will default to "all"
(link rx tx).

Signed-off-by: Christian Lamparter <[email protected]>
(backported from 641dc50164d30d4962499e1974fafde9b337faaf)
package/base-files/files/bin/config_generate
package/base-files/files/etc/init.d/led
package/base-files/files/lib/functions/uci-defaults.sh