diff options
| -rw-r--r-- | rpc/xdr/src/nlm4-xdr.h | 6 | ||||
| -rw-r--r-- | xlators/features/marker/utils/src/procdiggy.h | 4 | ||||
| -rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 17 | 
3 files changed, 23 insertions, 4 deletions
diff --git a/rpc/xdr/src/nlm4-xdr.h b/rpc/xdr/src/nlm4-xdr.h index 683d54ef5..d95a6ad6e 100644 --- a/rpc/xdr/src/nlm4-xdr.h +++ b/rpc/xdr/src/nlm4-xdr.h @@ -27,6 +27,12 @@  #include <rpc/rpc.h> +#if defined(__NetBSD__) +#define xdr_u_quad_t xdr_u_int64_t +#define xdr_quad_t   xdr_int64_t +#define xdr_uint32_t xdr_u_int32_t +#define xdr_uint64_t xdr_u_int64_t +#endif  #ifdef __cplusplus  extern "C" { diff --git a/xlators/features/marker/utils/src/procdiggy.h b/xlators/features/marker/utils/src/procdiggy.h index f4586de6c..ee87b0e39 100644 --- a/xlators/features/marker/utils/src/procdiggy.h +++ b/xlators/features/marker/utils/src/procdiggy.h @@ -17,6 +17,10 @@    <http://www.gnu.org/licenses/>.  */ +#ifdef __NetBSD__ +#include <sys/syslimits.h> +#endif /* __NetBSD__ */ +  #define PROC "/proc"  pid_t pidinfo (pid_t pid, char **name); diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 37cc2f9f6..1eae61ad8 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;  | 
