3 # Copyright (C) 2013 OpenWrt.org
17 config_get sysfs
$cfg sysfs
18 config_get name
$cfg name
20 [ -z "$sysfs" ] && return
22 for tuple
in $tuples; do
27 new_sysfs
=$
(echo ${sysfs} | sed "s/${old}/${new}/")
29 [ "$new_sysfs" = "$sysfs" ] && continue
31 uci set system.${cfg}.sysfs="${new_sysfs}"
34 logger -t led-migration "sysfs option of LED
\"${name}\" updated to
${new_sysfs}"
41 config_foreach do_led_update_sysfs led "$@
"
44 case "$
(board_name
)" in
46 migrate_leds "dgn3500
:blue
:wireless
=dgn3500
:green
:wireless
"
52 [ "$LED_OPTIONS_CHANGED" = "1" ] && uci commit system