Bug 18405 - init.d/autofs is broken for NIS automounter maps
init.d/autofs is broken for NIS automounter maps
Product: Red Hat Linux
Classification: Retired
Component: autofs (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Depends On:
  Show dependency treegraph
Reported: 2000-10-05 10:46 EDT by Jay Berkenbilt
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-05 21:32:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jay Berkenbilt 2000-10-05 10:46:09 EDT
In /etc/rc.d/init.d/autofs, the function getmounts() does nothing unless
/etc/auto.master exists.  The function getrawmounts() on the other hand
knows that if /etc/auto.master doesn't exist that it should look in NIS

Just removing this condition seems to fix the problem fine.  I'm not sure
why it's even there.  I don't have Pinstripe anymore, but it seems to me
that this problem was not present in the pinstripe release since I used
autofs via NIS fine there.

My trivial patch is attached.

--- autofs.qdist        Wed Aug 23 14:28:36 2000
+++ autofs      Tue Oct  3 08:21:55 2000
@@ -94,8 +94,6 @@
 # Check for local maps to be loaded
-if [ -f /etc/auto.master ]
     knownmaps=" "
     getrawmounts | (
        while read dir map options
@@ -152,7 +150,6 @@
             knownmaps=" $dir/ $knownmaps"
Comment 1 Thilo Mezger 2000-10-05 14:54:58 EDT
Well, I thought this this was a feature and not a bug.  Before, you always had
to remove /etc/auto.* to get your maps from NIS but now it even gets my NIS maps
when I have those files in /etc.

This means, I now don't even have to remove the files to get maps from NIS as I
always had to do RHL 6.x.
Comment 2 Nalin Dahyabhai 2000-10-05 21:32:46 EDT
That particular part of the patch we apply to the init script must have fallen
out at some point.  It will be re-added.  Thanks!
Comment 3 Nalin Dahyabhai 2001-01-11 23:07:58 EST
The current incarnation of the repeatedly-modified init script now scans
/etc/nsswitch.conf, so this should be Right for everyone.

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