On Mon, 2013-02-04 at 10:46 +0100, Günter Merz wrote: > Quoting Ian Kent <raven@xxxxxxxxxx>: Sorry, meant to reply to this. > > > You shouldn't even need two maps, you should be able to use the NFS map > > and it should bind mount the fs if it is seen to be local. > > How would that one map be looking? Yeah, I re-read you post and I was wrong. autofs will discriminate based on the address of the server given in the map entry. So any host name that resolves to localhost or 127.0.0.1 or to the address of a local interface on the machine will cause a bind mount to be done. The exception to that is if the nobind autofs option is given (if the version of autofs you use doesn't have the nobind option the nosymlink option should have the same effect). So what you need is actually a bit difficult. I guess one way to achieve this would be to use the local hosts file and dns. Add an entry that maps the server name to localhost in the hosts file, then use dns (or dnsmasq at home say) to map the server name to it's address, and also ensure that the name resolution order is dns then hosts, which I think is the default anyway. Of course that assumes that you have control over this stuff at home and that you use dhcp to get your dns server addresses, since they would have to change. At least that's the theory, not sure it will actually work though, ;) > > > There have been various difficulties over time, what version of autofs > > are you using? > > I'm using > > Linux automount version 5.0.7 (Arch Linux) > > Thanks for looking into this. > > My next attempt to get this working is: > > Getting my automount maps via LDAP and using > > automount: ldap files > > in nsswitch.conf and hope that ldap is chosen over files if it's available. That's not a bad idea actually. If LDAP is first in the order then it should be consulted before file maps, yes. For indirect maps subsequent duplicate master map entries would be ignored and the first encountered used. But direct maps might be a problem, I can't remember now what's done for duplicate direct map entries, actually what would be duplicate entries in the maps themselves since multiple direct map master map entries is legal and allows multiple map sources to be used for them. Ian -- To unsubscribe from this list: send the line "unsubscribe autofs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html