From: Jo-Philipp Wich Date: Thu, 3 Dec 2015 21:12:56 +0000 (+0000) Subject: base-files: board.d: support ide leds X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b3f8340a5e36bcf1287985830adf51096c27445b;p=librecmc%2Flibrecmc.git base-files: board.d: support ide leds Add ucidef_set_led_ide() to define "ide-disk" triggered leds. Signed-off-by: Jo-Philipp Wich SVN-Revision: 47729 --- 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"