Camm Maguire on Tue  7/03 17:59 -0500:
> --- autofs-3.1.4.orig/samples/rc.autofs.in
> +++ autofs-3.1.4/samples/rc.autofs.in
> @@ -106,7 +106,10 @@
>           if [ ! -z "$dir" -a ! -z "$map" \
>                       -a x`echo "$map" | cut -c1` != 'x-' ]
>           then
> -             map=`echo "$map" | sed -e 's/^auto_/auto./'`
> +             if echo $map | grep ^auto_ >/dev/null && \

Not all maps are named auto*.  Try "egrep '^[[:alnum:]]+_'"

But now that I think of it, there is really no reason for this line at
all.

> +             [ $(ypcat $map 2>/dev/null | head | wc -l) -eq 0 ] ; then

Please do not use $() as this is bash-only.  Not everyone has bash
installed, although I will grant you that most people in the GNU
universe do :) I have run into people that use zsh as their /bin/sh,
for example.

-- 
Scott McDermott, Questra Desktop and Network Services (QDN)
(716) 381-0292 x525
QDN service via web: http://qweb.web.roc.questra.com/srs/
QDN service via email: [EMAIL PROTECTED]

Reply via email to