>From [EMAIL PROTECTED]  Wed Jan 31 20:30:26 2001
>Return-Path: <[EMAIL PROTECTED]>
Received: from hera.kernel.org (IDENT:[EMAIL PROTECTED] [209.10.217.83])
        by gateway.camelot.jp (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id UAA08981
        for <[EMAIL PROTECTED]>; Wed, 31 Jan 2001 20:30:24 +0900
Received: (from majordom@localhost)
        by hera.kernel.org (8.9.3/8.9.3) id CAA04251
        for autofs-list; Wed, 31 Jan 2001 02:21:41 -0800
Received: from violet.setuza.cz ([EMAIL PROTECTED] [194.149.118.97])
        by hera.kernel.org (8.9.3/8.9.3) with ESMTP id CAA04248
        for <[EMAIL PROTECTED]>; Wed, 31 Jan 2001 02:21:39 -0800
Received: from ADMIN ([EMAIL PROTECTED] [2.2.2.21])
        by violet.setuza.cz (8.10.2/8.10.2) with SMTP id f0VALcd21373
        for <[EMAIL PROTECTED]>; Wed, 31 Jan 2001 11:21:38 +0100
From: Frank Schafer <[EMAIL PROTECTED]>
Organization: SETUZA a.s.
To: [EMAIL PROTECTED]
Subject: can automount ONLY CD
Date: Wed, 31 Jan 2001 12:12:25 +0100
X-Mailer: KMail [version 1.0.28]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Message-Id: <01013112262503.06007@ADMIN>
Sender: [EMAIL PROTECTED]
Precedence: bulk
Status: O
Content-Length: 4067
Lines: 138
X-Mime-Autoconverted: from 8bit to 7bit by courier 0.34

Hi all,

I've configured the autofs-3.1.7 package on a Slackware 7.0 box (kernel 2.2.13).

here are the configuration files:

/etc/fstab
/dev/hda1       /               ext2    defaults        1       1
/dev/hda2       /opt            ext2    defaults        1       2
/dev/hda3       swap            swap    defaults        1       2
/dev/hda5       /usr            ext2    defaults        1       2
/dev/hda6       /tmp            ext2    defaults        1       2
/dev/hda7       /var            ext2    defaults        1       2
/dev/hda8       /v_dsk          ext2    defaults        1       2
/dev/hdb        /cdrom          iso9660 ro,users,noauto 0       0
/dev/fd0        /floppy         ext2    defaults,noauto 0       0
none            /dev/pts        devpts  gid=5,mode=620  0       0
none            /proc           proc    defaults        0       0

/etc/auto.master
/auto /etc/auto.auto --timeout 60

/etc/auto.auto
cd              -fstype=iso9660,ro      :/dev/cdrom
fd              -fstype=ext2            :/dev/fd0
smbcd           -fstype-nfs,soft,ro     smbsrv:/cdrom

If I do an ``ls /auto/cd'' --for instance, everything works VERY fine, but for
``ls /auto/fd'' or ``ls /auto/smbcd'' i get:
# ls /auto/fd
ls: /auto/fd: No such file or directory
#

Does autofs work ONLY for the CDROM??? I've tried put ``fd'' in the first place
of ``auto.auto'', don't help.

I don't have ANY clue, what could be wrong, so any hint would be welcome.

Thanks in advance
Frank

Oops, here is the startup script I use

/ertc/rc.d/init.d/autofs
#!/bin/bash
#
# autofs:       init script to start the linux automounter
# Version:      1.0     2001/01/31
#
# Author:       Frank Schaefer ([EMAIL PROTECTED])
#
# Starts up the automounter daemon using a Sun-style master map.
# We're looking for local maps only in this version. (No way to test
# yp-maps :o( )
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DAEMON=`which automount`
if [ $? -ne 0 ] ; then
  echo "${0}: No automount daemon available, exiting" 1>&2
  exit 1
fi
if [ ! -f /etc/auto.master ] ; then
  echo "${0}: no master map defined, exiting" 1>&2
  exit 1
fi
 
# Add some global local system options here
LOCALOPTIONS=''
SUBSYS=autofs
LOCKFILE=/var/lock/subsys/${SUBSYS}
 
function getmounts()
{
   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 [ -x ${MAP} ]; then
               echo "${DAEMON} ${DIR} program ${MAP} ${OPTIONS} ${LOCALOPTIONS}"
            elif [ -f ${MAP} ]; then
               echo "${DAEMON} ${DIR} file ${MAP} ${OPTIONS} ${LOCALOPTIONS}"
            else
               echo "${DAEMON} ${DIR} `basename ${MAP}` ${OPTIONS} ${LOCALOPTIONS}"
            fi
         fi
      done
   )
}
 
case "${1}" in
   start)
      if [ -f ${LOCKFILE} ] ; then
         echo "${SUBSYS} is already running, nothing done"
         exit 1
      else
         echo "Starting ${SUBSYS}"
         getmounts | sh
         touch ${LOCKFILE}
      fi
   ;;
   stop)
      if [ ! -f ${LOCKFILE} ] ; then
         echo "${SUBSYS} is not running, nothing done"
         exit 1
      else
         echo "Stopping ${SUBSYS}"
         kill -TERM `pidof ${DAEMON}`
         rm -f ${LOCKFILE}
      fi
   ;;
   restart)
      if [ ! -f ${LOCKFILE} ] ; then
         echo "${SUBSYS} is not running, nothing done"
         exit 1
      else
         ${0} stop
         ${0} start
      fi
   ;;
   status)      echo "Configured Mount Points:"
      echo "------------------------"
      getmounts
      echo -e "\nActive mount points:"
      echo "--------------------"
      ps ax | grep "[0-9]:[0-9][0-9] automount " | (
         while read PID TT STAT TIME COMMAND; do
            echo ${COMMAND}
         done
      )
   ;;
   *)
      echo "Please call me: ${0} {start|stop|restart|status}"
      exit 1
   ;;
esac
exit 0

Reply via email to