Bug 228502 - autofs don't understand -null
autofs don't understand -null
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: autofs (Show other bugs)
All Linux
high Severity medium
: ---
: ---
Assigned To: Jeff Moyer
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2007-02-13 07:28 EST by Ralf Brunckhorst
Modified: 2007-11-16 20:14 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0734
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-15 11:02:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
diff for changed autofs start-script that enable the -null feature (433 bytes, text/x-patch)
2007-02-13 07:28 EST, Ralf Brunckhorst
no flags Details
new autofs diff file (1.07 KB, text/x-patch)
2007-02-13 11:27 EST, Ralf Brunckhorst
no flags Details
Add support for -null map handling (400 bytes, patch)
2007-04-04 13:49 EDT, Jeff Moyer
no flags Details | Diff

  None (edit)
Description Ralf Brunckhorst 2007-02-13 07:28:24 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:
  /app     -null
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):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
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.
Comment 1 Ralf Brunckhorst 2007-02-13 07:28:25 EST
Created attachment 147981 [details]
diff for changed autofs start-script that enable the -null feature
Comment 2 Jeff Moyer 2007-02-13 10:18:29 EST
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.

Comment 3 Ralf Brunckhorst 2007-02-13 11:27:22 EST
Created attachment 147998 [details]
new autofs diff file

Hope that this work now, Ralf.
Comment 4 Ralf Brunckhorst 2007-02-14 04:11:34 EST
For FC there is a working autofs version, but we need it for RHEL-4.
Comment 5 Jeff Moyer 2007-04-04 13:49:35 EDT
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.
Comment 7 Ralf Brunckhorst 2007-04-16 08:41:53 EDT
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-' ]
Comment 8 Jeff Moyer 2007-04-23 12:10:21 EDT
(In reply to comment #7)
> Hi, was on vacation. I have tested your patch, it works also for me but the
> patch should be:
>  		fi
>  	    done
> +	    if [ "$map" == "-null" ]; then
> +		knownmaps=" $dir/ $knownmaps"
> +		continue
> +	    fi
> +
>  	    if [ ! -z "$dir" -a ! -z "$map" \
>  			-a x`echo "$map" | cut -c1` != 'x-' ]
>  	    then

Thanks for testing.  I don't see how the above is different from the posted
patch.  Could you explain, please?
Comment 9 Ralf Brunckhorst 2007-04-24 03:20:30 EDT
Sorry, it is the same. Maybe I made a copy/paste mistake.
Comment 10 RHEL Product and Program Management 2007-05-09 03:47:06 EDT
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
Comment 11 Matt Seitz 2007-05-22 19:19:26 EDT
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. 
Comment 13 Jeff Moyer 2007-07-18 10:10:32 EDT
An RHTS regression test was createad for this under autofs-tests/bugzillas,
subtest bz228502.
Comment 15 Jeff Moyer 2007-07-19 17:56:13 EDT
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).
Comment 19 Jeff Moyer 2007-08-28 16:47:56 EDT
The patch was committed to CVS.
Comment 22 errata-xmlrpc 2007-11-15 11:02:17 EST
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.


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