Bug 74164 - small bug in autofs init script
small bug in autofs init script
Status: CLOSED DUPLICATE of bug 58304
Product: Red Hat Linux
Classification: Retired
Component: autofs (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-17 01:50 EDT by Marc MERLIN
Modified: 2007-04-18 12:46 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:49:38 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 Marc MERLIN 2002-09-17 01:50:26 EDT
I fixed a little bug in the init script.
I reported this to autofs@linux.kernel.org but never heard back
                                                                                
I needed to have this:
root     29001  0.0  0.0  1552  600 pts/5    S    12:25   0:00
/usr/sbin/automount --timeout 300 /var/local/tftproot/auto yp auto.auto
rsize=8192,wsize=8192,hard,intr,timeo=1
root     29090  0.0  0.0  1552  600 pts/5    S    12:25   0:00
/usr/sbin/automount --timeout 300 /auto yp auto.auto
rsize=8192,wsize=8192,hard,intr,timeo=1
(...)


The problem  is that the  grep looked for /auto/  which would match  on both
mountpoints:

+ read dir map options
+ '[' '!' -z auto.auto -a auto.auto = -hosts ']'
++ echo auto.auto
++ cut -c1
++ echo ' /u2/  /net/  /misc/  /auto/  /u2/  /net/  /var/local/tftproot/auto/  '
++ grep /auto/
+ '[' '!' -z /auto -a '!' -z auto.auto -a xa '!=' x- -a ' /u2/  /net/  /misc/ 
/auto/  /u2/  /net/  /var/local/tftproot/auto/  ' = '' ']'
+ knownmaps= /auto/  /u2/  /net/  /misc/  /auto/  /u2/  /net/ 
/var/local/tftproot/auto/

The fix is:
--- autofs.redhat       Tue Aug 20 12:19:14 2002
+++ autofs      Tue Aug 20 12:25:08 2002
@@ -156,7 +156,7 @@
            fi
            if [ ! -z "$dir" -a ! -z "$map" \
                        -a x`echo "$map" | cut -c1` != 'x-' \
-                       -a "`echo "$knownmaps" | grep $dir/`" = "" ]
+                       -a "`echo "$knownmaps" | grep ' '$dir/`" = "" ]
            then
                # If the options include a -t or --timeout parameter, then
                # pull those particular options out.

Cheers,
Marc
Comment 1 Jeffrey Moyer 2004-03-19 18:17:15 EST

*** This bug has been marked as a duplicate of 58304 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:49:38 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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