Red Hat Bugzilla – Bug 228502
autofs don't understand -null
Last modified: 2007-11-16 20:14:55 EST
Description of problem:
We use linux and solaris boxes in our NIS-env. The NIS-servers are solaris and
for the workstation we have created a indirect-map for /app in NIS.
We need a possibility to disable a auto-mount-map. In solaris this is possible
with the -null option:
We need it for a indirect mount: /app
On linux this should be a link to an afs-path, in solaris it is a normal
nfs-point mounted via automounter.
But that dosn't work in RHEL.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
I have open this bug also for fc6 and there it is fixed 214800.
We have modified the start-script for autofs, can you implemet the changes to
the rpm-packages. I will include a diff as attachment.
Created attachment 147981 [details]
diff for changed autofs start-script that enable the -null feature
Could you please re-generate this diff using the "-u" option? Something like:
diff -up /etc/init.d/autofs.orig /etc/init.d/autofs > autofs.diff
Then, attach that file to the bugzilla. The diff you provided is incomplete (it
doesn't contain header information, like which file it is a diff of). I also
couldn't manually apply it to the 4.1.3-187 code base, so something is amiss.
Created attachment 147998 [details]
new autofs diff file
Hope that this work now, Ralf.
For FC there is a working autofs version, but we need it for RHEL-4.
Created attachment 151684 [details]
Add support for -null map handling
The patch posted previously was a less than ideal solution. I would rather add
explicit handling for "-null" as an option as opposed to relying on
undocumented ordering of variable assignment in the init script.
So, here's a replacement patch. It works in my environment. Please test it.
Hi, was on vacation. I have tested your patch, it works also for me but the
patch should be:
+ if [ "$map" == "-null" ]; then
+ knownmaps=" $dir/ $knownmaps"
if [ ! -z "$dir" -a ! -z "$map" \
-a x`echo "$map" | cut -c1` != 'x-' ]
(In reply to comment #7)
> Hi, was on vacation. I have tested your patch, it works also for me but the
> patch should be:
> + if [ "$map" == "-null" ]; then
> + knownmaps=" $dir/ $knownmaps"
> + continue
> + fi
> if [ ! -z "$dir" -a ! -z "$map" \
> -a x`echo "$map" | cut -c1` != 'x-' ]
Thanks for testing. I don't see how the above is different from the posted
patch. Could you explain, please?
Sorry, it is the same. Maybe I made a copy/paste mistake.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Thank you for providing the patch. I used it to fix a problem with an NIS
auto.master entry that was invalid for my system. I look forward to having
this included in an official update.
An RHTS regression test was createad for this under autofs-tests/bugzillas,
This fix was committed to autofs-4.1.3-222 (though I missed it in the changelog;
I'll fix that on the next build).
The patch was committed to CVS.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.