summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorHarshavardhana <harsha@gluster.com>2010-03-15 04:12:36 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-15 22:06:42 -0700
commit45a4f4a263e06eb53c485a5bc2f79322eef8dc3f (patch)
tree4d22c6340291a260c34edea0100d5aec61741705 /extras
parent029062c103cb1bd0736bb4fb8606c3be53d0ad7f (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
Diffstat (limited to 'extras')
-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 6b12ea8ebff..208b7f72bf8 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: