diff options
-rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 40bf4815059..40fd5781ef0 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -192,7 +192,7 @@ check_recursive_mount () export PATH; # check whether getfattr exists - which getfattr > /dev/null; + which getfattr > /dev/null 2>&1; if [ $? -ne 0 ]; then return; fi @@ -204,7 +204,14 @@ check_recursive_mount () fi # check if the mount point is a brick's parent directory - brick_path=(`cat /etc/glusterd/vols/*/bricks/* | grep ^path | cut -d "=" -f 2`); + GLUSTERD_WORKDIR="/etc/glusterd"; + + ls -L "$GLUSTERD_WORKDIR"/vols/*/bricks/* > /dev/null 2>&1; + if [ $? -ne 0 ]; then + return; + fi + + brick_path=(`grep ^path "$GLUSTERD_WORKDIR"/vols/*/bricks/* | cut -d "=" -f 2`); root_inode=`stat -Lc %i /`; root_dev=`stat -Lc %d /`; mnt_inode=`stat -Lc %i $mnt_dir`; |