diff options
author | Harshavardhana <harsha@gluster.com> | 2010-03-15 04:12:36 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-15 22:06:42 -0700 |
commit | 45a4f4a263e06eb53c485a5bc2f79322eef8dc3f (patch) | |
tree | 4d22c6340291a260c34edea0100d5aec61741705 | |
parent | 029062c103cb1bd0736bb4fb8606c3be53d0ad7f (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.py | 2 |
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: |