aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-08-06 14:30:42 +0200
committerDavid Bauer <mail@david-bauer.net>2019-08-10 00:32:28 +0200
commitda0de5e007cda0abef442bef860f867033206291 (patch)
treee7aad18a3a2053332beaaaf2a2e91da80491962d /target/linux/ramips/base-files
parentd7c082ba4f7de97b3708d1f4a064954ffc774778 (diff)
downloadupstream-da0de5e007cda0abef442bef860f867033206291.tar.gz
upstream-da0de5e007cda0abef442bef860f867033206291.tar.bz2
upstream-da0de5e007cda0abef442bef860f867033206291.zip
ramips: fix LED labels not updated during device name changes
In commit d93969a13a5b ("ramips: Improve compatible for TP-Link Archer devices") and subsequent ones, names of several devices in ramips have been changed. Since LED names are frequently invoked by $boardname, this has broken LED setup in 01_leds, as $boardname and prefix in DTS do not match anymore. This patch updates device name prefixes for LEDs in DTS files, and provides a migration script. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ramips/base-files')
-rw-r--r--target/linux/ramips/base-files/etc/uci-defaults/04_led_migration67
1 files changed, 67 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/base-files/etc/uci-defaults/04_led_migration
new file mode 100644
index 0000000000..e84d02331b
--- /dev/null
+++ b/target/linux/ramips/base-files/etc/uci-defaults/04_led_migration
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/migrations.sh
+
+board=$(board_name)
+
+case "$board" in
+fon,fonera-20n)
+ migrate_leds "^fonera20n:=fonera-20n:"
+ ;;
+intenso,memory2move)
+ migrate_leds "^m2m:=memory2move:"
+ ;;
+lenovo,newifi-y1)
+ migrate_leds "^y1:=newifi-y1:"
+ ;;
+lenovo,newifi-y1s)
+ migrate_leds "^y1s:=newifi-y1s:"
+ ;;
+netgear,wn3000rp-v3)
+ migrate_leds "^wn3000rpv3:=wn3000rp-v3:"
+ ;;
+netgear,wndr3700-v5)
+ migrate_leds "^wndr3700v5:=wndr3700-v5:"
+ ;;
+tplink,archer-c2-v1)
+ migrate_leds "^c2-v1:=archer-c2-v1:"
+ ;;
+tplink,archer-c20-v1)
+ migrate_leds "^c20-v1:=archer-c20-v1:"
+ ;;
+tplink,archer-c20-v4)
+ migrate_leds "^c20-v4:=archer-c20-v4:"
+ ;;
+tplink,archer-c20i)
+ migrate_leds "^c20i:=archer-c20i:"
+ ;;
+tplink,archer-c50-v1)
+ migrate_leds "^c50:=archer-c50-v1:"
+ ;;
+tplink,archer-c50-v3)
+ migrate_leds "^c50-v3:=archer-c50-v3:"
+ ;;
+tplink,archer-c50-v4)
+ migrate_leds "^c50-v4:=archer-c50-v4:"
+ ;;
+tplink,archer-mr200)
+ migrate_leds "^mr200:=archer-mr200:"
+ ;;
+youku,yk1)
+ migrate_leds "^youku-yk1:=yk1:"
+ ;;
+zyxel,keenetic-omni)
+ migrate_leds "^kn_rc:=keenetic-omni:"
+ ;;
+zyxel,keenetic-omni-ii)
+ migrate_leds "^kn_rc:=keenetic-omni-ii:"
+ ;;
+zyxel,keenetic-viva)
+ migrate_leds "^kng_rc:=keenetic-viva:"
+ ;;
+esac
+
+migrations_apply system
+
+exit 0