summaryrefslogtreecommitdiffstats
path: root/extras/volgen/CreateVolfile.py
diff options
context:
space:
mode:
authorHarshavardhana <harsha@gluster.com>2010-03-15 04:14:14 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-15 22:06:34 -0700
commit4b690df4e2055ce42557c303e3738e11c7aec172 (patch)
tree594f90fcbadfb61f518a3fac770ec091d75c9e67 /extras/volgen/CreateVolfile.py
parent536e5a2208d162801367f8a4189a29ca7fd8f1a9 (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/volgen/CreateVolfile.py')
-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: