Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2020 21:56:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 245704] sysutils/fusefs-smbnetfs script to mount using /etc/fstab
Message-ID:  <bug-245704-7788-mEOe5jRd1P@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-245704-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-245704-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245704

Mikhail Teterin <mi@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mi@FreeBSD.org
              Flags|maintainer-feedback?(mi@ALD |maintainer-feedback-
                   |AN.algebra.com)             |

--- Comment #1 from Mikhail Teterin <mi@FreeBSD.org> ---
The current smbnetfs itself can be used in fstab with the following trick:

-oallow_other   /smb            fusefs=20
rw,allow_other,failok,uid=3D105,late,direct_io,mountprog=3D/usr/local/bin/s=
mbnetfs

That is, instead of "smbnetfs", the first column can contain simply one of =
the
command-line options...

Your approach makes the fstab-entry look better, but is it worth the troubl=
e of
implementing at all? And, if it is, the options-parsing code inside smbnetfs
itself should, probably, be patched instead.

As for your particular implementation, it would seem that $OPTS ends up
containing all of the options in one argument -- instead of there being
multiple arguments...

Also, the last line should begin with exec.

I'd do something like this (not tested):

SMBNETFS=3D%%PREFIX%%/bin/smbnetfs

if [ $# -gt 1 -a -n "${1##-*}" ]
then
        shift # Skip the non-option argument, if there are more than one
fi

exec $SBNETFS "$@"

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245704-7788-mEOe5jRd1P>