Greetings!

"H. Peter Anvin" <[EMAIL PROTECTED]> writes:

> Peter Bunclark wrote:
> > 
> > On Mon, 28 Feb 2000, H. Peter Anvin wrote:
> > >
> > > Because Sun specs that an underscore "may" be interpreted as a dot when
> > > relating to the auto_master map (apparently implying both should be
> > > tested.)
> > >
> > > The Sun auto_master file is so broken.  I wish it didn't exist :(
> > >

Well then isn't this diff something like what you intend?  Wouldn't
this make everyone happy?

--- /etc/init.d/autofs  Sat May  8 15:54:47 1999
+++ /home/camm/autofs   Tue Feb 29 15:22:36 2000
@@ -100,7 +100,13 @@
            if [ ! -z "$dir" -a ! -z "$map" \
                        -a x`echo "$map" | cut -c1` != 'x-' ]
            then
-               map=`echo "$map" | sed -e 's/^auto_/auto./'`
+#
+# First check for map as provided, then try _ -> . allowed by Sun
+# in case of failure
+#
+               if [ `ypcat -k $map 2>/dev/null | wc -l` -eq 0 ] ; then
+                   map=`echo "$map" | sed -e 's/^auto_/auto./'`
+               fi
                # special: treat -t or --timeout (or any reasonable derivative)
                # specially, since it can't be made a normal mount option.
                mountoptions=""


-- 
Camm Maguire                                            [EMAIL PROTECTED]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

Reply via email to