Author: blogic
Date: 2016-04-01 09:11:56 +0200 (Fri, 01 Apr 2016)
New Revision: 49106

Modified:
   trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh
Log:
ar71xx: avoid AR71XX_MODEL ending with a space on some TP-LINK-like devices

Instead of adding the space when combining $model and $hwver, add the space
to the beginning of $hwver, so the resulting string won't end with a space
when $hwver is set to the empty string.

Signed-off-by: Matthias Schiffer <[email protected]>

Modified: trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh
===================================================================
--- trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh  2016-04-01 07:11:53 UTC 
(rev 49105)
+++ trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh  2016-04-01 07:11:56 UTC 
(rev 49106)
@@ -99,7 +99,7 @@
        hwid=$(tplink_get_hwid)
        mid=$(tplink_get_mid)
        hwver=${hwid:6:2}
-       hwver="v${hwver#0}"
+       hwver=" v${hwver#0}"
 
        case "$hwid" in
        "015000"*)
@@ -171,8 +171,8 @@
        "083000"*)
                model="TP-Link TL-WA830RE"
 
-               if [ "$hwver" = 'v10' ]; then
-                       hwver='v1'
+               if [ "$hwver" = ' v10' ]; then
+                       hwver=' v1'
                fi
                ;;
        "084100"*)
@@ -277,7 +277,7 @@
                ;;
        esac
 
-       AR71XX_MODEL="$model $hwver"
+       AR71XX_MODEL="$model$hwver"
 }
 
 tplink_pharos_get_model_string() {
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to