From 3aed8bbefe0078eca80dd3a53f005e7a94281424 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 30 May 2016 21:01:29 +0200 Subject: fuse: accept the -s option to allow automounting autofs passes the -s option when mounting. All /sbin/mount. helpers accept this, except mount.glusterfs. Because the helper fails when -s is passed accessing the mountpoint through autofs gives the following error: $ ls /lan/storage.lan.example.net/repos ls: cannot open directory /lan/storage.lan.example.net/repos: Too many levels of symbolic links Cherry picked from commit c8da5669a15ed6944cceb9d003789ff333754bff: > BUG: 1340936 > Change-Id: I84755cdac59e630618cb745c0eb3228cc1e93a1a > Signed-off-by: Niels de Vos > Reviewed-on: http://review.gluster.org/14559 > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Smoke: Gluster Build System > Reviewed-by: Oleksandr Natalenko Change-Id: I84755cdac59e630618cb745c0eb3228cc1e93a1a BUG: 1344551 Signed-off-by: Niels de Vos Tested-by: Kaveh Minooie Reviewed-on: http://review.gluster.org/14686 Smoke: Gluster Build System Reviewed-by: Oleksandr Natalenko NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/mount/fuse/utils/mount.glusterfs.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 7f314da69ec..66537727673 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -566,7 +566,7 @@ main () ## `mount` specifies options as a last argument shift 2; fi - while getopts "Vo:hn" opt; do + while getopts "Vo:hns" opt; do case "${opt}" in o) parse_options ${OPTARG}; @@ -574,6 +574,9 @@ main () ;; n) ;; + s) + # accept+ignore sloppy mount, passed by autofs + ;; V) ${cmd_line} -V; exit 0; -- cgit