diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-05-23 14:48:09 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-05-23 23:07:11 -0700 |
commit | eff9a75fd95d98b30d0aaa04903ab42b56951d34 (patch) | |
tree | a33c3d776cce221e630433495a932c285f91f32d /xlators/mount/fuse/utils | |
parent | f5eaa270405da6b39fcad426bfd7c182fa11203f (diff) |
mount.glusterfs : multiple fixes
* made log-level and other string comparisons be case insensitive
* fixed wrong spelling, wrong command usage in case of brick inode
computation
* used 'cut' instead of 'tr' as piping the result to read was not
working fine in few cases.
Change-Id: I9caab481cfd80000b8ef9de7a44006729c88cc1b
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 823403
Reviewed-on: http://review.gluster.com/3413
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/utils')
-rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 2901873e3cf..c313e552fa1 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -57,8 +57,10 @@ _init () start_glusterfs () { + # lets the comparsion be case insensitive for all strings + if [ -n "$log_level_str" ]; then - case "$log_level_str" in + case "$( echo $log_level_str | tr '[a-z]' '[A-Z]')" in "ERROR") log_level=$LOG_ERROR; ;; @@ -247,7 +249,7 @@ check_recursive_mount () tmp_brick="$brick"; brick="$brick"/..; brick_dev=`${lgetdev} $brick`; - brick_inode=`${gletdev} $brick`; + brick_inode=`${lgetinode} $brick`; if [ "$mnt_inode" -eq "$brick_inode" -a "$mnt_dev" -eq "$brick_dev" ]; then echo ERROR: $mnt_dir is a parent of the brick $tmp_brick; exit 2; @@ -275,7 +277,9 @@ main () # "mount -t glusterfs" sends this, but it's useless. "rw") ;; *) - (echo "$pair" | tr "=" " ")|read key value + key=$(echo "$pair" | cut -f1 -d'='); + value=$(echo "$pair" | cut -f2- -d'='); + # Handle options with values. case "$key" in "log-level") log_level_str=$value ;; |