base-files: allow setting ide-disk led trigger
Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46794
This commit is contained in:
parent
05e4d736d1
commit
e1824f2543
1 changed files with 16 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue