From: Gabor Juhos Date: Sat, 31 Dec 2011 15:02:35 +0000 (+0000) Subject: package/base-files: add support for the switch LED trigger X-Git-Tag: v19.07.0-rc1~25905 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ff89832fdb49495f5fda786f83be8ab2c5667352;p=openwrt%2Fstaging%2Fhauke.git package/base-files: add support for the switch LED trigger SVN-Revision: 29629 --- diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 12ae50ba17..241986cb19 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -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 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 } }