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 "$@"
46 board=$(ar71xx_board_name)
50 migrate_leds "wndap360:=netgear:"
54 migrate_leds "wndr3700:=netgear:"
58 migrate_leds "wnr2000:=netgear:"
62 migrate_leds "wnr2200:=netgear:"
66 migrate_leds "wnr612v2:=netgear:"
73 [ "$LED_OPTIONS_CHANGED" == "1" ] && uci commit system