aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/ramips/mt7621/base-files/etc/rc.button/lights_toggle16
1 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7621/base-files/etc/rc.button/lights_toggle b/target/linux/ramips/mt7621/base-files/etc/rc.button/lights_toggle
new file mode 100755
index 0000000000..c008b633a4
--- /dev/null
+++ b/target/linux/ramips/mt7621/base-files/etc/rc.button/lights_toggle
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+[[ "${ACTION}" = "released" ]] || exit 0
+
+. /lib/functions.sh
+
+case "$(board_name)" in
+tplink,ec330-g5u-v1)
+ led_light="/sys/class/gpio/led-light/value"
+ echo "$((!$(cat $led_light)))" > "$led_light"
+;;
+ *)
+;;
+esac
+
+return 0