Hi!

autofs from PLD doesn't work with auto.master in the format:

mount_point maptype:mapname options

I enclose a patch to the autofs.init that corrects it.

I have also a question to the line

options=`echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g'`

Why the leading dash in options is stripped?



#v+
Index: autofs.init
===================================================================
RCS file: /cvsroot/SOURCES/autofs.init,v
retrieving revision 1.25
diff -u -r1.25 autofs.init
--- autofs.init 2 Oct 2004 10:44:55 -0000       1.25
+++ autofs.init 27 Feb 2005 11:41:51 -0000
@@ -50,6 +50,8 @@
        while read dir map options; do
                if [ ! -z "$dir" -a ! -z "$map" \
                   -a x`echo "$map" | cut -c1` != 'x-' ]; then
+                    maptype=`echo $map | cut -f1 -d:`
+                       if [ "$maptype" = "$map" ]; then
                        map=`echo "/etc/autofs/$map" | sed -e 
's:^/etc\/autofs//:/:'`
                        options=`echo "$options" | sed -e 's/\(^\|[ 
\t]\)-/\1/g'`
                        if [ -x $map ]; then
@@ -59,6 +61,15 @@
                        else
                                echo "$DAEMON --timeout $TIMEOUT $dir `basename 
$map` $options"
                        fi
+                       else
+                               map=`echo $map | cut -f2- -d:`
+                               if [ ! -z "$map" ]; then
+                                       if [ "$maptype" = "file" ]; then
+                                               map=`echo "/etc/autofs/$map" | 
sed -e 's:^/etc\/autofs//:/:'`
+                                       fi
+                                       echo "$DAEMON --timeout $TIMEOUT $dir 
$maptype $map $options"
+                               fi
+                       fi
                fi
        done
        )
@@ -111,7 +122,6 @@
   stop)
        if [ -f /var/lock/subsys/autofs ]; then
                msg_stopping automounter
-#              automount -TERM
                killproc automount
                rm -f /var/lock/subsys/autofs >/dev/null 2>&1
        else
#v-

Best wishes,

-- 
  Kacper Kornet

_______________________________________________
pld-devel-en mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to