From ca297bc9ba096c64e182872692981a1d7ee250fa Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 15 Jun 2012 09:55:28 +0200 Subject: stat(1) flag to specify format is not portable This is a backport of Change-Id: Iae3c40b03118078530c29d14d5f7180c36361c16 BUG: 764655 Change-Id: Ic4e7adbda6b53b248aa93cd20a045cb885fa818e Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.com/3579 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mount/fuse/utils/mount.glusterfs.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 251f50e166f..bdb5959ff05 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -130,7 +130,15 @@ start_glusterfs () $cmd_line; - inode=$(stat -c %i $mount_point 2>/dev/null); + case `uname -s` in + NetBSD) + sleep 1 # settle + inode=$(stat -f %i ${mount_point}/ 2>/dev/null); + ;; + Linux) + inode=$(stat -c %i $mount_point 2>/dev/null); + ;; + esac # this is required if the stat returns error if [ -z "$inode" ]; then -- cgit