Bug 9366

Summary: Problem with /etc/rc.d/init.d/autofs
Product: [Retired] Red Hat Linux Reporter: Kambiz Aghaiepour <kambiz>
Component: autofsAssignee: Cristian Gafton <gafton>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-11 22:20:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kambiz Aghaiepour 2000-02-11 21:16:55 UTC
There is a bug in RedHat6.1 /etc/rc.d/init.d/autofs file.  On line 59,
inside of the getmounts() shell function, the line that reads:

       if echo $map | grep -- ':' ; then

should read

       if echo $map | grep -- ':' 1>/dev/null 2>&1 ; then

alternatively you could add the -q -s flags to the grep command.  The
reason that this is a bug is that if you look on line 129 (the start
section of the main case), you'll see that the getmounts() function is
intended to produce standard output that is piped to a sh for
interpretation.  The grep output clutters the output and causes errors
(although they are harmless errors and the desired outcome is still
acheived; nonetheless I call it a bug).  You won't run into this if you
do not have a map type prefix separated from the mapname with a ":"
character.  I discovered this because I have a local /etc/auto.master
file and one of the lines in that file read:

/home yp:auto.home

(You'd think this is a common scenario.  But I think if you rely on a
global auto.master map - i.e. you don't have a local /etc/auto.master -
you would not encounter this problem).

Kambiz

Comment 1 Cristian Gafton 2000-02-11 22:20:59 UTC
Fixed in the devel tree