diff options
author | Harshavardhana <harsha@gluster.com> | 2010-03-15 04:14:14 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-15 22:06:34 -0700 |
commit | 4b690df4e2055ce42557c303e3738e11c7aec172 (patch) | |
tree | 594f90fcbadfb61f518a3fac770ec091d75c9e67 /extras | |
parent | 536e5a2208d162801367f8a4189a29ca7fd8f1a9 (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.py | 2 |
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: |