From: John Crispin Date: Sat, 14 Feb 2015 20:47:58 +0000 (+0000) Subject: uci-defaults: add ucidef_set_led_mmc X-Git-Tag: reboot~4265 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eea462106f20fbd90acc6cfba21c73b9677b2752;p=oweals%2Fopenwrt.git uci-defaults: add ucidef_set_led_mmc Signed-off-by: Álvaro Fernández Rojas SVN-Revision: 44446 --- diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index eb5b240ee3..5a8809d68c 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -140,6 +140,23 @@ EOF UCIDEF_LEDS_CHANGED=1 } +ucidef_set_led_mmc() { + local cfg="led_$1" + local name=$2 + local sysfs=$3 + local trigger=$4 + + uci -q get system.$cfg && return 0 + + uci batch <