package/base-files: add support for the switch LED trigger
SVN-Revision: 29629
This commit is contained in:
parent
3f85c52a3a
commit
ff89832fdb
2 changed files with 9 additions and 1 deletions
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=99
|
PKG_RELEASE:=100
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
|
|
|
@ -60,6 +60,14 @@ load_led() {
|
||||||
[ -n "$port_state" ] && \
|
[ -n "$port_state" ] && \
|
||||||
echo $port_state > /sys/class/leds/${sysfs}/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
|
esac
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue