I've got an auto.master map on my NIS server:
/misc /etc/auto.misc --timeout 60
/home yp:auto.home --timeout 60
/home/ftp/pub/iso /etc/auto.iso --timeout 60
The idea being that /home gets automounted elsewhere,
and /home/ftp/pub/iso does too. 1) Is this supported? The autofs man
page would seem to indicate not.
Assuming 1) is yes, then /etc/rc.d/init.d/autofs has a problem. The check
in getmounts() throws away my /home entry because the grep
# These checks screen out duplicates and skip over directories
# where the map is '-'.
if [ ! -z "$dir" -a ! -z "$map" \
-a x`echo "$map" | cut -c1` != 'x-' \
-a "`echo "$knownmaps" | grep $dir/`" = "" ]
Assuming 1) is no, autofs still has a problem, in that I can't have two
Even though they're two different directories, the grep will kill the
From: Nalin Dahyabhai [mailto:email@example.com]
Sent: Thursday, February 22, 2001 2:35 PM
Subject: Re: autofs script skips non-duplicates too
Won't work. An autofs filesystem (autofs 3, anyway) doesn't support
creation of subdirectories, so you can't start up an automounter on
/home and then immediately start one on /home/ftp/pub/iso. If you try
reversing the order, the automounter in /home/ftp/pub/iso gets hidden
when you overlay something on top of it in /home. More on that below.
The extra '/' at the end of the pattern prevents this, at least on my
Going back to the original question, you can accomplish this using
submounts. Add an entry to the auto.home map like this:
ftp -fstype=autofs file:/etc/auto.home.ftp
and one in /etc/auto.home.ftp that looks like this:
pub -fstype=autofs file:/etc/auto.home.ftp.pub
and one in /etc/auto.home.ftp.pub that looks like this:
iso -fstype=autofs file:/etc/auto.iso
That should approximate what you're looking for, messy though it looks.