diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-12-03 21:12:56 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-12-03 21:12:56 +0000 |
commit | 190453214b96a3c6eedf13a3afcfd27a07449a28 (patch) | |
tree | ed0c64bd9f8cd857f054fbb4118d2406dd4eda20 | |
parent | 556bc9580efeadf16f449be5a8207ccc31646983 (diff) | |
download | master-187ad058-190453214b96a3c6eedf13a3afcfd27a07449a28.tar.gz master-187ad058-190453214b96a3c6eedf13a3afcfd27a07449a28.tar.bz2 master-187ad058-190453214b96a3c6eedf13a3afcfd27a07449a28.zip |
base-files: board.d: support ide leds
Add ucidef_set_led_ide() to define "ide-disk" triggered leds.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47729 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults-new.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults-new.sh b/package/base-files/files/lib/functions/uci-defaults-new.sh index 14c7f9294d..37978a839a 100755 --- a/package/base-files/files/lib/functions/uci-defaults-new.sh +++ b/package/base-files/files/lib/functions/uci-defaults-new.sh @@ -406,6 +406,22 @@ ucidef_set_led_gpio() { json_select .. } +ucidef_set_led_ide() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" + + json_select_object led + + json_select_object "$1" + json_add_string name "$name" + json_add_string sysfs "$sysfs" + json_add_string trigger ide-disk + json_select .. + + json_select .. +} + ucidef_set_led_rssi() { local cfg="led_$1" local name="$2" |