> On Wed, 2005-04-20 at 09:57 -0700, Lever, Charles wrote: > > ok, i've reviewed the code in the kernel that generates the > contents of > > /proc/mounts. this will always show at least the transport > protocol and > > the NFS version. /etc/mtab (and thus the mount command) does not > > guarantee this; if a mount is done with defaults (ie the > options aren't > > specified), the options in effect will not show up in /etc/mtab. > > > > /proc/mounts is modulated by the namespace of the process that is > > reading it. if the automounter process can see all system mounts, > > you're golden, but any namespace-related access control > will affect the > > ability for an automounter to read the mount options you're > interested > > in from /proc/mounts. > > > > the kernel (post 2.6.12) can do under-the-cover mounts. > thus entries > > may be added to or removed from /proc/mounts over time, and > there may be > > an interesting challenge to find the right entry given this churn. > > But this info will only show existing mounts. If there are no > NFS mounts > when the automounter is started, then /proc/mounts won't tell us > anything useful. > > What we really need is some what to know what the default NFS > transport/version is for the kernel we're running on. We also probably > need to get at this info without relying on doing an actual > mount first.
today the default behavior is determined by the mount command, not by the kernel. the only way i can think of doing this is by building a table indexed by the output of "mount -v" that reports what the defaults are. alternately you can just "open all hailing frequencies" -- do a ping over both transports and against all versions of the protocol, and see what you get back. _______________________________________________ autofs mailing list autofs@linux.kernel.org http://linux.kernel.org/mailman/listinfo/autofs