summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarshavardhana <harsha@gluster.com>2010-03-15 04:13:33 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-15 22:06:38 -0700
commit593568d34430c0bc64d25c48280bbe931eb15332 (patch)
treec27217f11c2e34c42111092b6c63c17e14cee55b
parentc686a46d1d9a2e0e3abd0b1eecb647f6afe53a3b (diff)
Fixed "." delimiter for cache-size calculation which would fail on different locale.
Thanks to Filip Valder < valder (a) netdevelo.cz > for suggestions. Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 720 (Default . decimal delimiter will not work for other locale) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=720
-rw-r--r--extras/volgen/CreateVolfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/volgen/CreateVolfile.py b/extras/volgen/CreateVolfile.py
index 6b12ea8eb..208b7f72b 100644
--- a/extras/volgen/CreateVolfile.py
+++ b/extras/volgen/CreateVolfile.py
@@ -4,7 +4,7 @@ import subprocess
num_replica = 2
num_stripe = 4
#Cachesize calculator
-cache_size = "`grep 'MemTotal' /proc/meminfo | awk '{print $2 * 0.2 / 1024}' | cut -f1 -d.`"
+cache_size = "`echo $[ $(grep 'MemTotal' /proc/meminfo | sed 's/[^0-9]//g') / 5120 ]`"
class CreateVolfile: