1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-07 11:49:40 +00:00

glusterfs should be mountable by means of /etc/fstab now

as we have /sbin/mount_fusefs in all supported FreeBSD versions,
for example:

gluster1:name /mnt/name fusefs rw,late,backup-volfile-servers=gluster2:gluster3,mountprog=/usr/local/sbin/mount_glusterfs 0 0

Make it work by fixing shell script /usr/local/sbin/mount_glusterfs
to properly process multiple -o command line options.

PR:		224451
Submitted by:	Vladimir Kurtukov <vk@vk.pp.ru>
Reported by:	Vladimir Kurtukov <vk@vk.pp.ru>
Approved by:	craig001@lerwick.hopto.org (maintainer)
This commit is contained in:
Eugene Grosbein 2018-02-11 05:40:56 +00:00
parent b77f1e3552
commit b2384d48d6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=461459
2 changed files with 58 additions and 1 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= glusterfs
PORTVERSION= 3.11.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= net
MASTER_SITES= http://bits.gluster.org/pub/gluster/glusterfs/src/

View File

@ -0,0 +1,57 @@
--- xlators/mount/fuse/utils/mount_glusterfs.in.orig 2017-06-27 22:25:12.392137135 +0700
+++ xlators/mount/fuse/utils/mount_glusterfs.in 2017-12-19 18:24:21.736142000 +0700
@@ -463,50 +463,44 @@ parse_options()
if [ "$key" = "$value" ]; then
without_options $pair;
else
with_options $key $value;
fi
done
}
main ()
{
- ## `mount` on OSX specifies options as first argument
- echo $1|grep -q -- "-o"
- if [ $? -eq 0 ]; then
- volfile_loc=$3
- mount_point=$4
- else
- volfile_loc=$1
- mount_point=$2
- fi
-
while getopts "Vo:h" opt; do
case "${opt}" in
o)
parse_options ${OPTARG};
;;
V)
${cmd_line} -V;
exit 0;
;;
h)
print_usage;
exit 0;
;;
?)
print_usage;
exit 0;
;;
esac
done
+ shift $((OPTIND - 1))
+ volfile_loc="$1"
+ mount_point="$2"
+
[ -r "$volfile_loc" ] || {
# '%' included to support ipv6 link local addresses
server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%.\-]*\):.*/\1/p');
volume_str=$(echo "$volfile_loc" | sed -n 's/.*:\([^ ]*\).*/\1/p');
[ -n "$volume_str" ] && {
volume_id="$volume_str";
}
volfile_loc="";
}