1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 20:53:22 +02:00

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
This commit is contained in:
juhosg 2011-12-31 15:02:35 +00:00
parent 4c27fd2675
commit ca385d45a3
2 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=base-files
PKG_RELEASE:=99
PKG_RELEASE:=100
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=opkg/host

View File

@ -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
}
}