summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/utils/mount.glusterfs.in
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/utils/mount.glusterfs.in')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in11
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 40bf48150..40fd5781e 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`;