aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-07-14 07:35:59 +0000
committerJohn Crispin <john@openwrt.org>2015-07-14 07:35:59 +0000
commitd0d3ca2a1bc5fc61233351e1f5f5cd462e59407b (patch)
tree9f57ec55f5936263945d198e09fabb715d659ba5 /package/base-files/files/etc
parentc54b1be7c24eb1248e2df5d9a39bf8c4d7181fa4 (diff)
downloadupstream-d0d3ca2a1bc5fc61233351e1f5f5cd462e59407b.tar.gz
upstream-d0d3ca2a1bc5fc61233351e1f5f5cd462e59407b.tar.bz2
upstream-d0d3ca2a1bc5fc61233351e1f5f5cd462e59407b.zip
base-files: added option to configure the gpio led trigger in uci-defaults
Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de> SVN-Revision: 46341
Diffstat (limited to 'package/base-files/files/etc')
-rwxr-xr-xpackage/base-files/files/etc/init.d/led7
1 files changed, 7 insertions, 0 deletions
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index 1a57e8afd7..3f45732499 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -26,6 +26,8 @@ load_led() {
config_get port_state $1 port_state
config_get delay $1 delay "150"
config_get message $1 message ""
+ config_get gpio $1 gpio "0"
+ config_get inverted $1 inverted "0"
if [ "$trigger" = "rssi" ]; then
# handled by rssileds userspace process
@@ -80,6 +82,11 @@ load_led() {
echo $delay > /sys/class/leds/${sysfs}/delay
;;
+ "gpio")
+ echo $gpio > /sys/class/leds/${sysfs}/gpio
+ echo $inverted > /sys/class/leds/${sysfs}/inverted
+ ;;
+
switch[0-9]*)
local port_mask