summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2012-05-13 09:11:57 +0200
committerVijay Bellur <vijay@gluster.com>2012-05-15 22:27:19 -0700
commit27ae1677eb2a6ed4a04bda0df5cc92f2780c11ed (patch)
tree9230b8922f2196dcd852734441501b11325255a1 /xlators/mount
parent7503c63ee141931556cf066b9b255fc62cefcb68 (diff)
NetBSD build fixes
Last batch of NetBSD build fixes, makes 3.3.0qa40 operational. Round 2: only include <sys/syslimits.h> for NetBSD BUG: 764655 Change-Id: Icd7290f1e340675d763665a0d0c5f95bc14e0c55 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3321 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mount')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in17
1 files changed, 13 insertions, 4 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index 37cc2f9f60a..1eae61ad8cb 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# (C) 2006, 2007, 2008 Gluster Inc. <http://www.gluster.com>
#
# This program is free software; you can redistribute it and/or
@@ -233,7 +233,7 @@ check_recursive_mount ()
return;
fi
- brick_path=(`grep ^path "$GLUSTERD_WORKDIR"/vols/*/bricks/* | cut -d "=" -f 2`);
+ 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`;
@@ -283,7 +283,7 @@ main ()
# "mount -t glusterfs" sends this, but it's useless.
"rw") ;;
*)
- read key value < <(echo "$pair" | tr "=" " ")
+ (echo "$pair" | tr "=" " ")|read key value
# Handle options with values.
case "$key" in
"log-level") log_level_str=$value ;;
@@ -343,8 +343,17 @@ main ()
exit 0;
}
+ case `uname -s` in
+ NetBSD)
+ mounttab=/proc/mounts
+ ;;
+ Linux)
+ mounttab=/etc/mtab
+ ;;
+ esac
+
# Simple check to avoid multiple identical mounts
- if grep -q " $mount_point fuse" /etc/mtab; then
+ if grep -q " ${mount_point}.*fuse" $mounttab; then
echo -n "$0: according to mtab, GlusterFS is already mounted on "
echo "$mount_point"
exit 0;