On Mon, 22 May 2006, Daniel Qarras wrote: > > >> 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
This is not right. The script is passed the key and you must emit the mount corresponding to that key. Look at auto.net for an example. Ian _______________________________________________ autofs mailing list [email protected] http://linux.kernel.org/mailman/listinfo/autofs
