diff options
-rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 216d03c4182..ea7205b95e2 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -673,8 +673,9 @@ main () [ -n "$volume_str" ] && { volume_id=$volume_str volume_str_temp=$volume_str - [ ${volume_str:0:1} = '/' ] && { - volume_str_temp=${volume_str:1} + first_char=$(echo "$volume_str" | cut -c 1) + [ ${first_char} = '/' ] && { + volume_str_temp=$(echo "$volume_str" | cut -c 2-) } [ $(echo $volume_str_temp | grep -c "/") -eq 1 ] && { volume_id=$(echo "$volume_str_temp" | cut -f1 -d '/'); |