[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: autofs - ls doesn't appear to work?



On 16:02 13 Nov 2002, Bernard McAuley <bernard mcauley phyworks-ic com> wrote:
| I'm runing autofs-3.1.7-21 and it is up and running OK, but the
| automounter only kicks in when a directory is moved to.  For example,
| support I have a root directory /example in which I put two keys test1
| and test2.  So that the final directories would look like:-
| 
| /example/test1
| /example/test2
| 
| If I cd /example/test1 or cd /example/test2 then everything works find.
| However, if before this I were to cd /example and run an ls then I can
| see no directories.

This is a feature.
It defers the mount until the data are actually needed.

Also, if you have a wildcard key then you _can't_ meaningfully do
a complete listing.

This behaviour may never change. Instead, if you really want a
listing-capable directory, provide a parallel directory populared with
symlinks, eg:

	/example		# the automount point

	/public			# what you tell your users to use
		foo => /example/foo
		bah => /example/bah

This lets you have a listable directory. You can automatically keep the
link directory in sync by writing a small script that reads the automount
config file and makes (and removes) links as needed.

I did this rather thoroughly for a CDROM jukebox here. For a complicated
example see this script:

	http://www.zip.com.au/~cs/scripts/mkisoconfs

which does that kind of thing (and a bunch of other stuff; we have
permission sets with some of our CDs to make sure we adhere to licences
for our poor Windows users who have to use nonfree software).

Cheers,
-- 
Cameron Simpson, DoD#743        cs zip com au    http://www.zip.com.au/~cs/

Getting a SCSI chain working is perfectly simple if you remember that there
must be exactly three terminations: one on one end of the cable, one on the
far end, and the goat, terminated over the SCSI chain with a silver-handled
knife whilst burning *black* candles.	- Anthony DeBoer   





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]