From 5e8d1213bcf575a39d80c65b1598cf9335a94c0d Mon Sep 17 00:00:00 2001 From: juhosg Date: Tue, 29 May 2012 16:39:16 +0000 Subject: base-files: add LED specific functions to /lib/functions/uci-defaults git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31991 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../base-files/files/lib/functions/uci-defaults.sh | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) (limited to 'package/base-files/files') diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index a1371e5e3..2cbf69a6f 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -1,6 +1,104 @@ #!/bin/sh # Copyright (C) 2011 OpenWrt.org +UCIDEF_LEDS_CHANGED=0 + +ucidef_set_led_netdev() { + local cfg="led_$1" + local name=$2 + local sysfs=$3 + local dev=$4 + + uci -q get system.$cfg && return 0 + + uci batch <