Bug 28917 - autofs script skips non-duplicates too
autofs script skips non-duplicates too
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: autofs (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-22 15:20 EST by Matt Domsch
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-22 15:57:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matt Domsch 2001-02-22 15:20:17 EST
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 
matches /home/ftp/pub/iso.

   # 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/`" = "" ]
   then


Assuming 1) is no, autofs still has a problem, in that I can't have two 
entries:
/mymnt2 /etc/auto.mymnt2
/mymnt  /etc/auto.mymnt

Even though they're two different directories, the grep will kill the 
second one.
Comment 1 Matt Domsch 2001-02-22 15:57:00 EST
From: Nalin Dahyabhai [mailto:nalin@redhat.com]
Sent: Thursday, February 22, 2001 2:35 PM
To: testers-list@redhat.com
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
test machine.

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.

Cheers,

Nalin

Note You need to log in before you can comment on or make changes to this bug.