Hi!

I am rather baffled! I am using Slackware 8.1/9.0 and have been setting up autofs with 
the --timeout option.

The syntax for the automount command should be:

automount --timeout 60 /mnt/whatever file /etc/auto.whatever

The /etc/auto.master file would contain the line:

/mnt/whatever /etc/auto.whatever --timeout 60

(according to any documentation that I can find).

However, the startup script grabbed from Slackware - it is, as far as I can see, just 
a pared down version of the "standard" one for init.d systems - will not put the 
timeout option in the correct place. Options just get the "-" lopped off and are then 
stuck on the end of the line, as if they were options for mounting.

In itself this is no problem, I can write my own script. But what puzzles me is that 
this doesn't cause problems for lots of people. Are there different versions of things 
floating about with different properties?

Greetings,

Michael Towers


-------------------------------------------------------------------------

Here is the rc.autofs from Slackware:

#!/bin/sh
#
# rc.autofs - Starts the filesystem automounter
# Last modified 12-Dec-2000 by David Cantrell, <[EMAIL PROTECTED]>
#

#
# This function will build a list of automount commands to execute in
# order to activate all the mount points. It is used to figure out
# the difference of automount points in case of a reload
#
function getmounts()
{
   # Check for local maps to be loaded
   if [ -f /etc/auto.master ]
   then
      cat /etc/auto.master | sed -e '/^#/d' -e '/^$/d'| (
         while read dir map options
         do
            if [ ! -z "$dir" -a ! -z "$map" \
                 -a x`echo "$map" | cut -c1` != 'x-' ]
            then
               map=`echo "/etc/$map" | sed -e 's:^/etc//:/:'`
               options=`echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g'`

               if [ ! -d $dir ]
               then
                  mkdir -p $dir
               fi

               if [ -x $map ]
               then
                  echo "/usr/sbin/automount $dir program $map $options $localoptions"
               elif [ -f $map ]
               then
                  echo "/usr/sbin/automount $dir file $map $options $localoptions"
               else
                  echo "/usr/sbin/automount $dir `basename $map` $options 
$localoptions"
               fi
            fi
         done )
   fi

   # Check for NIS maps to be loaded
   if [ -e /usr/bin/ypcat ] && 
      [ `ypcat -k auto.master 2>/dev/null | wc -l` -gt 0 ]
   then
      ypcat -k auto.master | (
         while read dir map options
         do
            if [ ! -z "$dir" -a ! -z "$map" \
                 -a x`echo "$map" | cut -c1` != 'x-' ]
            then
               map=`echo "$map" | sed -e 's/^auto_/auto./'`

               if echo $options | grep -- '-t' >/dev/null 2>&1
               then
                  mountoptions="--timeout $(echo $options | \
                     sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')"
               fi

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

               if [ ! -d $dir ]
               then
                  mkdir -p $dir
               fi

               echo "/usr/sbin/automount $dir yp $map $options $localoptions"
            fi
         done )
   fi
}

getmounts | sh
_______________________________________________
autofs mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to