From ca385d45a3d565989aa7f6a6f4cf454b918435f4 Mon Sep 17 00:00:00 2001 From: juhosg Date: Sat, 31 Dec 2011 15:02:35 +0000 Subject: package/base-files: add support for the switch LED trigger git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29629 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/etc/init.d/led | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'package/base-files/files') diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index c0e26a0b8b..43964bf0bb 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -60,6 +60,14 @@ load_led() { [ -n "$port_state" ] && \ echo $port_state > /sys/class/leds/${sysfs}/port_state ;; + + switch[0-9]*) + local port_mask + + config_get port_mask $1 port_mask + [ -n "$port_mask" ] && \ + echo $port_mask > /sys/class/leds/${sysfs}/port_mask + ;; esac } } -- cgit v1.2.3