diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2011-12-31 15:02:35 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2011-12-31 15:02:35 +0000 |
commit | ff89832fdb49495f5fda786f83be8ab2c5667352 (patch) | |
tree | 58493a879a15ae1dcff6eab158a55aca993c305e /package/base-files/files | |
parent | 3f85c52a3a9e5c54ddacaf91d406d9f7b94dbcc7 (diff) | |
download | mtk-20170518-ff89832fdb49495f5fda786f83be8ab2c5667352.zip mtk-20170518-ff89832fdb49495f5fda786f83be8ab2c5667352.tar.gz mtk-20170518-ff89832fdb49495f5fda786f83be8ab2c5667352.tar.bz2 |
package/base-files: add support for the switch LED trigger
SVN-Revision: 29629
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-x | package/base-files/files/etc/init.d/led | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index c0e26a0..43964bf 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 } } |