aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/base-files/etc/uci-defaults
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-10-21 16:29:35 +0200
committerJohn Crispin <john@phrozen.org>2019-10-22 11:41:37 +0200
commit144379e14908fcd9411e3ed6c6cefc238fc4900a (patch)
tree96c2f2aefa2783feb1986c70d0d61ae8865ccb27 /target/linux/ath79/base-files/etc/uci-defaults
parent77d8efe80e20da8dfed0139790319356bf94c49a (diff)
downloadupstream-144379e14908fcd9411e3ed6c6cefc238fc4900a.tar.gz
upstream-144379e14908fcd9411e3ed6c6cefc238fc4900a.tar.bz2
upstream-144379e14908fcd9411e3ed6c6cefc238fc4900a.zip
ath79: use board name in LED migrations
Several devices added to LED migration script will just have their (old) board name converted to tp-link. By using a variable for this, the amount of code in the migration script can be reduced and the chance for typos is reduced. This patch also introduces the marker for beginning of a pattern "^" to the regex, so the match is more specific. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 6b0eb84336edc995f4723f0a005507f158d3e895)
Diffstat (limited to 'target/linux/ath79/base-files/etc/uci-defaults')
-rw-r--r--target/linux/ath79/base-files/etc/uci-defaults/04_led_migration7
1 files changed, 3 insertions, 4 deletions
diff --git a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
index bc40d22c09..a512225523 100644
--- a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
@@ -4,6 +4,7 @@
. /lib/functions/migrations.sh
board=$(board_name)
+boardonly="${board##*,}"
case "$board" in
engenius,epg5000)
@@ -12,11 +13,9 @@ engenius,epg5000)
tplink,archer-c7-v2)
migrate_leds ":blue:=:green:"
;;
-tplink,archer-c7-v4)
- migrate_leds "archer-c7-v4:=tp-link:"
- ;;
+tplink,archer-c7-v4|\
tplink,archer-c7-v5)
- migrate_leds "archer-c7-v5:=tp-link:"
+ migrate_leds "^$boardonly:=tp-link:"
;;
wd,mynet-n750)
migrate_leds "wd:=mynet-n750:"