Skip to contentSkip to conversation

auto.master duplicate entry checking broken in init script

PATCH New Jeff Moyer 1 participant 1 message Mar 30, 2004 Kernel automounter

lore
Share & tools
lore

Jeff Moyer

author
#0 lore raw

PATCH 1/1 auto.master duplicate entry checking broken in init script

Hello,

If you have entries in your auto.master such as:

/home/u
/u

then the second will be perceived as a dup of the first, due to an in-exact regexp. Attached is a fix which checks for a proper word boundary.

Cheers,

Jeff

samples/rc.autofs.in renamed from samples/rc.autofs.in.init-redhat-only +1 -1
@@ -162,7 +162,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 or a -g or --ghost
 		# parameter, then pull those particular options out.