projects
/
openwrt
/
staging
/
hauke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05e4d73
)
base-files: allow setting ide-disk led trigger
author
Jonas Gorski
<jogo@openwrt.org>
Fri, 4 Sep 2015 14:45:45 +0000
(14:45 +0000)
committer
Jonas Gorski
<jogo@openwrt.org>
Fri, 4 Sep 2015 14:45:45 +0000
(14:45 +0000)
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 46794
package/base-files/files/lib/functions/uci-defaults.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/lib/functions/uci-defaults.sh
b/package/base-files/files/lib/functions/uci-defaults.sh
index 8ba95a22ff71893288b14e8d5338fd2795ee354d..2658d439ac04c7ecd45bc28112fb88b1c6dd38b5 100644
(file)
--- a/
package/base-files/files/lib/functions/uci-defaults.sh
+++ b/
package/base-files/files/lib/functions/uci-defaults.sh
@@
-178,6
+178,22
@@
EOF
UCIDEF_LEDS_CHANGED=1
}
+ucidef_set_led_ide_disk() {
+ local cfg="led_$1"
+ local name=$2
+ local sysfs=$3
+
+ uci -q get system.$cfg && return 0
+
+ uci batch <<EOF
+set system.$cfg='led'
+set system.$cfg.name='$name'
+set system.$cfg.sysfs='$sysfs'
+set system.$cfg.trigger='ide-disk'
+EOF
+ UCIDEF_LEDS_CHANGED=1
+}
+
ucidef_set_rssimon() {
local dev="$1"
local refresh="$2"