On Tue, Jul 25, 2000 at 11:15:31PM -0400, Sarang Lakare wrote:
> Then I tried to access a cd by saying ls /amnt/<tab> and I can't see any
> cdrom directory.. Is it created automatically or am I suppose to create it
> beforehand.

That's the only shortcoming of autofs.  You don't know which directories
maybe mounted with autofs, without looking at /etc/auto.*.

To access your cdrom, you'll have to type cd /amnt/cdrom (no tab!).  It will
then mount automagically, and the directory will also be created.  You might
get the idea that it might be wise to create symlinks pointing to that
automount dir, like ln -vs /amnt/cdrom /cdrom.  Don't do that though!  If
you list the contents of your / dir (ls -la /), this will try to mount
/amnt/cdrom, and if there's no CD in the CD-Rom, you will have to wait for
the timeout of autofs before you can go on.

> Infact, I tried creatign /amnt/cdrom and /amnt/floppy and then starting
> autofs.. but same results.. I can't see contents in /amnt/cdrom

This won't work.

To unmount your file systems before they are automatically unmounted, you
have to send the signal USR1 to all automount processes:

/usr/bin/killall -USR1 automount

Since it may be that only root can do that, I installed sudo and added this
line to /etc/sudoers:

ALL     ALL=NOPASSWD:/usr/bin/killall -USR1 automount

Now every user can type

sudo /usr/bin/killall -USR1 automount

And because that's a little bit much to type, I created a small script,
called /usr/local/scripts/demount (put it somewhere in the path).  The
contents:

#!/bin/sh
sudo /usr/bin/killall -USR1 automount


Alexander Skwar
-- 
Homepage:       http://www.digitalprojects.com
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:            7328191

Reply via email to