From: x@muc.ccc.de
To: Ian Kent <raven@themaw.net>
Cc: autofs@linux.kernel.org
Subject: Re: automounting smb share with options, and suggestion to use fstab entry for direct mounts without options and target
Date: Wed, 24 Feb 2010 16:22:50 +0100 [thread overview]
Message-ID: <4B85444A.5010605@muc.ccc.de> (raw)
In-Reply-To: <4B84916E.7060208@themaw.net>
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
hi!
Ian Kent wrote:
> You can't start a mount location with "/" because it will be interpreted
> as a path instead of a mount location. The sun ":" escape has always
> been used to cover this case.
ahok, sorry, i saw this construct but failed to find good documentation and just forgot about it...
what i also found out in the process: for a literal \ or $, they must be escaped (makes me curious about what can be done with $ - environment variables, i guess :). trailing / don't seem to make any troubles.
ok and to compensate for my bad conscience, attached a diff for the auto.master manpage, adding a paragraph describing the map format.
>> possibility to just add the mountpoint to the direct mounts, so that
>> automount will just mount the fs according to fstab (like when
[...]
> I'd need to think about it for a while.
great to hear, thanks for considering the idea! :)
btw another point i stumbled over is that the (imho quite nice) /etc/init.d/autofs status feature seems to have been removed in rev. 5 - if it's not meant to come back eventually, i guess it were a good idea to remove it from autofs.8, too.
regards,
Chris
[-- Attachment #2: auto.master.5.in.patch --]
[-- Type: text/x-patch, Size: 1872 bytes --]
--- auto.master.5.in.orig 2010-02-24 15:17:54.000000000 +0100
+++ auto.master.5.in 2010-02-24 16:00:52.000000000 +0100
@@ -157,6 +157,38 @@ command line.
Set the timeout for caching failed key lookups. This option can be
used to override the global default given either on the command line
or in the configuration.
+.SH MAP FORMAT
+.P
+The format of a map is as follows:
+.TP
+.IR key mount-options target
+.TP
+.B key
+defines the key (which is the name of the directory inside the indirect map's mountpoint) in case of an indirect map, or the full mountpoint (probably always absolute, as there's no special context for a relative path) in case of a direct map.
+.TP
+.B mount-options
+defines the mount options used when the respective filesystem is mounted. The options here are the same as the options given after the -o switch of mount, but with a leading \fB-\fP (e.g. for \fBmount <mountpoint> -o fstype=smbfs,user=foo <target>\fP, the equivalent \fBmount-options\fP would be \fB-fstype=smbfs,user=foo\fP).
+.TP
+.B target
+defines the target which is to be mounted. Targets beginning with \fB/\fP are interpreted as files. To specify a path, a leading \fB:\fP must be added. \fB\[rs]\fP is the escape character. A literal \fB\[rs]\fP can be used but then must be escaped (e.g. \fB\[rs]\[rs]\fP). A literal \fB$\fP can be used but must be escaped (\fB\[rs]$\fP).
+.TP
+As an example, a line in a direct map might look like this:
+.sp
+.RS +.2i
+.ta 1.0i
+.nf
+/srv/smb-e -fstype=smbfs,ip=192.168.1.2,user=administrator,password=secret,uid=root,gid=root ://192.168.1.2/E\[rs]$/
+.fi
+.RE
+.sp
+And a line in an indirect map might look like this:
+.sp
+.RS +.2i
+.ta 1.0i
+.nf
+floppy -fstype=auto :/dev/fd0
+.fi
+.RE
.SH GENERAL SYSTEM DEFAULTS CONFIGURATION
.P
The default value of several general settings may be changed in the
[-- Attachment #3: Type: text/plain, Size: 140 bytes --]
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
prev parent reply other threads:[~2010-02-24 15:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 17:55 automounting smb share with options, and suggestion to use fstab entry for direct mounts without options and target x
2010-02-24 2:39 ` Ian Kent
2010-02-24 15:22 ` x [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B85444A.5010605@muc.ccc.de \
--to=x@muc.ccc.de \
--cc=autofs@linux.kernel.org \
--cc=raven@themaw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.