Date: Tue, 12 Nov 1996 23:39:32 +0100 (WET) From: af@biomath.jussieu.fr To: jxh@cs.wustl.edu (James Hu) Cc: freebsd-questions@freebsd.org Subject: Re: amd and CDROM Message-ID: <199611122239.XAA07116@tom.biomath.jussieu.fr> In-Reply-To: <199611121935.NAA00534@plethora.cs.wustl.edu> from James Hu at "Nov 12, 96 01:35:46 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
James Hu wrote / a ecrit: > Hello! > > I am trying to get my CDROM drive to auto-mount and auto-unmount via > amd. What I would like is to be able to ``cd /cdrom'', and have it > automatically mounted for me. Then when I cd out of it via ``cd /'' > the CDROM automatically unmounts, so that I can press eject. > > However, my attempts have produced utter failures. Clearly, I do not > understand the format of the amd map file and the amd command line > options, or how they interact. > > What I have tried is to create an entry in fstab for the CDROM: > /dev/cd0a /cdrom cd9660 noauto,ro 0 0 > > Then, I wanted to create an entry an amd.map entry which corresponds to > /cdrom. I tried something like: > cdrom type:=program;mount:="/sbin/mount mount /cdrom";unmount:="/sbin/umount umount /cdrom" > > and attempted with calls to amd which looked like: > amd / amd.cdrom.map > > but this seems to lock up the machine. Has anyone tried something > similar and with better results than what I have been able to produce? > I would never claim to have a good understanding of how amd works (sometimes I wonder if anyone but its author has) but I'm pretty sure that starting amd with / as a map mount point is a bad idea. Amd takes control over any directory specified as parameter and wants to resolve any access below that point through the associated map. In your case, you're telling amd how to "resolve" the cdrom dir under /, but you're not giving it any rule for the other dirs. They become inaccessible. I'm afraid starting at / would never succeed whatever your efforts to specify a correct map would be, since amd itself needs to access files, and those file are somewhere below / of course. As a starter, I'd make /cdrom a soft link to something like /amd/cdrom, and start amd with "/amd" instead of "/" as first parameter. You also need to add a rule for everything but cdrom under /amd that just makes it a link to the local filesystem. That goes with a "*" as key, but unfortunately the machine I have amd maps on is currently down, so I can't be more specific. Check the example for the "hosts" map in amd's documentation, that will give you an idea. Good luck with amd -- you need it... and if you get replies from a true amd guru take his word over mine (and give me his e-mail address ;-) _Alain_ -- Alain FAUCONNET Ingenieur systeme - System Manager AP-HP/SIM Public Health 91 bld de l'Hopital 75013 PARIS FRANCE Medical Computing Research Labs Mail: af@biomath.jussieu.fr Tel: (+33) 1-40-77-96-19 Fax: (+33) 1-45-86-80-68 I've RTFMed. It says: "Refer to your system administrator" But... I *am* the system administrator :-]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611122239.XAA07116>