[packages] multiwan: Changed sed to simply remove the last digit.
authorcraigc <craigc@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 12 May 2010 21:19:51 +0000 (21:19 +0000)
committercraigc <craigc@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 12 May 2010 21:19:51 +0000 (21:19 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@21433 3c298f89-4303-0410-b956-a3cf2f4a3e73

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

index cf3519f..a89f8ca 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 b625805..68880ba 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)