[packages] multiwan: Changed sed to simply remove the last digit.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@21433 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user