lantiq-dsl: bugfix db negative sign after comma
authorJohn Crispin <john@openwrt.org>
Sat, 9 Apr 2016 10:25:20 +0000 (10:25 +0000)
committerJohn Crispin <john@openwrt.org>
Sat, 9 Apr 2016 10:25:20 +0000 (10:25 +0000)
If db is negative minus sign was shown after comma

Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
SVN-Revision: 49135

target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh

index aefefcd42badb6b4f8ea7fc74538a1e31a770750..adf245aa3b8b4d039e1fdef48bbe1493b6759087 100755 (executable)
@@ -31,7 +31,7 @@ dsl_string() {
 dbt() {
        local a=$(expr $1 / 10)
        local b=$(expr $1 % 10)
-       echo "${a}.${b}"
+       echo "${a}.${b#-}"
 }
 #
 # Take a number and convert to k or meg