aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-12-31 15:02:35 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-12-31 15:02:35 +0000
commit495ca478f937ceecd6935e5a1e58fcb75648fbd8 (patch)
treea65a58b48e689dfda16c54a6ce5fc5f84d2fd7f8 /package/base-files/files
parent3a99e733d34364e718f4b5f0245823db86a41b46 (diff)
downloadupstream-495ca478f937ceecd6935e5a1e58fcb75648fbd8.tar.gz
upstream-495ca478f937ceecd6935e5a1e58fcb75648fbd8.tar.bz2
upstream-495ca478f937ceecd6935e5a1e58fcb75648fbd8.zip
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
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/etc/init.d/led8
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 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
}
}