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