I would use "showmount", ping "mountd" for an export list, as the source
for module generating the NFS servers' mount list. Distinct mounts for each
export are acceptable. The only caveat is the size of the mount table if it is
fixed size.
Cheers,
Jim
"H. Peter Anvin" <[EMAIL PROTECTED]> on 03/23/99 06:05:09 PM
To: [EMAIL PROTECTED] (Andrew Patterson)
cc: Jim Peters/SYBASE, [EMAIL PROTECTED]
Subject: Re: autofs-3.1.1-8.i386 observations
> I implemented a quick hack at my site to get "hosts" functionality.
>
> Here is the relevent entry from my auto.master file:
>
> /net /etc/auto.net
>
> Here is my /etc/auto.net (which is executable, so the "program-type" map
> is used:
>
> #!/bin/bash
> if /usr/bin/ypmatch $1 hosts.byname 2>/dev/null 1>&2
> then
> echo $1:/
> fi
>
> I am using yellow-pages here to basically see if the host exists. It
> would be better (but even slower) to use nslookup.
>
> So now I can do the standard:
>
> ls /net/<hostname>
>
> stuff.
>
> Hope this helps. Anybody have a better "hack"?
>
> Andrew
This kind of stuff can be trivially implemented in an autofs module
using gethostbyname(); that would be faster. The problem is that most
hosts don't export /, or require multiple filesystems mounted.
If there is utility in the very simple solution, let me know and I'll
hack it up right away.
-hpa