From: John Crispin Date: Sat, 14 Feb 2015 20:47:58 +0000 (+0000) Subject: uci-defaults: add ucidef_set_led_mmc X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=eea462106f20fbd90acc6cfba21c73b9677b2752;p=openwrt%2Fstaging%2Fstintel.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 <