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 | b3f8340a5e36bcf1287985830adf51096c27445b (patch) | |
tree | 6a58cff64a5eda7db49ec8e661a56d1cbedbc888 /package/base-files | |
parent | 734ae1bd178a778a909335cf8ac633d4b7c39f51 (diff) | |
download | mtk-20170518-b3f8340a5e36bcf1287985830adf51096c27445b.zip mtk-20170518-b3f8340a5e36bcf1287985830adf51096c27445b.tar.gz mtk-20170518-b3f8340a5e36bcf1287985830adf51096c27445b.tar.bz2 |
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>
SVN-Revision: 47729
Diffstat (limited to 'package/base-files')
-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 14c7f92..37978a8 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" |