11 config_get sysfs
${cfg} sysfs
12 config_get name
${cfg} name
14 [ -z "${sysfs}" ] && return
16 for tuple
in ${tuples}; do
21 new_sysfs
=$
(echo ${sysfs} | sed "s/${old}/${new}/")
23 [ "${new_sysfs}" = "${sysfs}" ] && continue
25 uci set system.${cfg}.sysfs="${new_sysfs}"
27 logger -t led-migration "sysfs option of LED
\"${name}\" updated to
${new_sysfs}"
31 remove_devicename_led_sysfs() {
37 config_get sysfs ${cfg} sysfs
38 config_get name ${cfg} name
40 echo "${sysfs}" | grep -q ":.
*:" || return
42 new_sysfs=$(echo ${sysfs} | sed "s
/^
[^
:]*://")
44 uci set system.${cfg}.sysfs="${new_sysfs}"
46 logger -t led-migration "sysfs option of LED
\"${name}\" updated to
${new_sysfs}"
51 config_foreach migrate_led_sysfs led "$@
"
54 remove_devicename_leds() {
56 config_foreach remove_devicename_led_sysfs led
61 [ -n "$
(uci changes
${realm})" ] && uci -q commit ${realm}