[5121] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: automounter help

daemon@ATHENA.MIT.EDU (Jan-Ake Larsson)
Tue Nov 19 07:03:43 1996

To: redhat-list@redhat.com
From: Jan-Ake Larsson <jalar@mai.liu.se>
Date: Tue, 19 Nov 1996 13:00:24 +0100
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

This is how I did it: I mkdir:ed /a and /amd, wrote an init-script that
does

amd -x fatal,error,user,warn -l syslog /amd /etc/amd.map 2>/dev/null

(include it in rc.local if you want)

and in /etc/amd.map----------------------------
floppy  type:=program;\
        mount:="/bin/mount mount -t auto -o defaults,nosuid /dev/fd0
/${fs}";\
        unmount:="/bin/umount umount /${fs}"

cdrom   type:=program;\
        mount:="/bin/mount mount -t auto -o defaults,ro /dev/hdc
/${fs}";\
        unmount:="/bin/umount umount /${fs}"
-----------------------------------------------
There is reportedly a way _in_linux_ to use 
floppy  type:=ufs;dev:=/dev/fd0;opts:="type=auto,conv=auto"
but I haven't been able to get that to work.

And then I have 
ln -s /amd/floppy /mnt/floppy
ln -s /amd/cdrom /mnt/cdrom

They are accessible as /amd/floppy, but on the symlinks <TAB>-completion
works.

I also wrote a script called 'flush' that unmounts the floppy and cdrom
flush------------------------
#!/bin/bash
echo -n "Flushing... "
/usr/sbin/amq -u /amd/cdrom
/usr/sbin/amq -u /amd/floppy
if /usr/sbin/amq | grep -q "/amd/floppy"; then
    echo "Failed flush?! (try again)"
else
    echo "OK, you may remove the disk now."
fi
-----------------------------

You should add a line in /etc/rpc to get this script to work:
amq             300019  amd

There is a lot more you can do with amd.
Hope this helps.

/Jan-Åke


--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post