> >> A script should just output the map entry without the key. Like
> >> -fstype=nfs,rw,soft,intr 10.0.0.1:/work
> > 
> > Unfortunately, this still creates (null) directory and I can even
> go to
> > /var/autofs/whatever to see contents of /work. And if the script
> > outputs both /work and /home I see only either of them, depending
> the
> > order the entries are printed and if they are on the same line or
> in
> > two lines.
> 
> That's interesting.
> 
> You mean you get a directory "(null)" with no mount?
> That shouldn't happen because the the "(null)" key shouldn't be found
> and so shouldn't have a mount entry associated with it. If the script
> needs to return a fail on the lookup it should return 1, 0 on
> success.

The "(null)" directory has contents of /home. I now modified the script
so that it is just like this:

#!/bin/sh
echo -fstype=nfs,rw,soft,intr 10.0.0.1:/home
echo -fstype=nfs,rw,soft,intr 10.0.0.1:/work

The (null) directory is visible when I say:

cd /var/autofs
ls

It also gave me access to /home via any directory but not to /work.
meaning that I see contents of /home via these directories:

/var/autofs/home
/var/autofs/test
/var/autofs/work

Cheers,

Dan.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to