[packages] multiwan: Changed sed to simply remove the last digit.
authorCraig M. Coffee <cmcoffee@gmail.com>
Wed, 12 May 2010 21:19:51 +0000 (21:19 +0000)
committerCraig M. Coffee <cmcoffee@gmail.com>
Wed, 12 May 2010 21:19:51 +0000 (21:19 +0000)
SVN-Revision: 21433

net/multiwan/Makefile
net/multiwan/files/usr/bin/multiwan

index cf3519fe171c8da2ef6e1ccf7e8687c56f05dc33..a89f8ca456bf1f6910c9d0a98e6c4b95d2bfbddb 100644 (file)
@@ -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
 
index b6258050c2ec654714c3751f8f04ce9ab72c57ac..68880ba628a18b12c091dd25ec98b25c357da8fd 100755 (executable)
@@ -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)