Bug 74164 - small bug in autofs init script
Summary: small bug in autofs init script
Keywords:
Status: CLOSED DUPLICATE of bug 58304
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: autofs
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-17 05:50 UTC by Marc MERLIN
Modified: 2007-04-18 16:46 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:49:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Marc MERLIN 2002-09-17 05:50:26 UTC
I fixed a little bug in the init script.
I reported this to autofs.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 Jeff Moyer 2004-03-19 23:17:15 UTC

*** This bug has been marked as a duplicate of 58304 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:49:38 UTC
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.