From fad84c3e9c7267b9cbe81b929b1e8fda885f039e Mon Sep 17 00:00:00 2001 From: "Craig M. Coffee" Date: Wed, 12 May 2010 21:19:51 +0000 Subject: [PATCH] multiwan: Changed sed to simply remove the last digit. SVN-Revision: 21433 --- net/multiwan/Makefile | 2 +- net/multiwan/files/usr/bin/multiwan | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/multiwan/Makefile b/net/multiwan/Makefile index cf3519fe1..a89f8ca45 100644 --- a/net/multiwan/Makefile +++ b/net/multiwan/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=multiwan PKG_VERSION:=1.0.11 -PKG_RELEASE:=1 +PKG_RELEASE:=2 include $(INCLUDE_DIR)/package.mk diff --git a/net/multiwan/files/usr/bin/multiwan b/net/multiwan/files/usr/bin/multiwan index b6258050c..68880ba62 100755 --- a/net/multiwan/files/usr/bin/multiwan +++ b/net/multiwan/files/usr/bin/multiwan @@ -705,7 +705,7 @@ last_probability=$(expr $x / $(expr $total_wans - $i + 1)) rand_probability=$(expr $(expr $weight \* 1000) / $total_weight) roundlen=`expr length $rand_probability - 1` roundme=${rand_probability:$roundlen} -rand_probability=$(echo $rand_probability | sed s/$roundme//) +rand_probability=$(echo $rand_probability | sed 's/\(..\)\(.\)/\1/g') if [ $roundme -ge 5 ]; then rand_probability=$(expr $rand_probability + 1) -- 2.30.2