From owner-freebsd-questions Sun Feb 13 17: 7:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from anarcat.dyndns.org (phobos.IRO.UMontreal.CA [132.204.20.20]) by builder.freebsd.org (Postfix) with ESMTP id 883543EA7 for ; Sun, 13 Feb 2000 17:07:29 -0800 (PST) Received: by anarcat.dyndns.org (Postfix, from userid 1000) id 2FB911AE5; Sun, 13 Feb 2000 20:07:45 -0500 (EST) From: Spidey MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14503.21857.343169.24623@anarcat.dyndns.org> Date: Sun, 13 Feb 2000 20:07:45 -0500 (EST) To: Doug Barton Cc: Freebsd Questions Mailing list Subject: Re: Automounting drives References: <14502.62708.729632.899386@anarcat.dyndns.org> <38A7293A.3B9B8F08@gorean.org> X-Mailer: VM 6.72 under 21.1 (patch 8) "Bryce Canyon" XEmacs Lucid Reply-To: beaupran@iro.umontreal.ca Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ya guys are the best. Thanks for your patience. Once again, I forgot to take a look at the mailing lists archives, but I guess that I'm fogiven now.. :)) CU --- Big Brother told Doug Barton to write, at 13:59 of February 13: > Spidey wrote: > > > > Hi. > > > > I am searching for a program or hack to the capability to do have my > > /cdrom or /floppy mounted automatically as I need them. > > I recently sent this response to the list, however the mail archives > are down, so here you go. > > Well, the mail archives have some very interesting tidbits, as > do > various other sites. One extremely helpful reference is the > documentation > available through gnu info ('info amd') and/or the URL > http://www.netbsd.org/Documentation/bsd/amdref.html. > > The thing about amd is that everyone has their own way of doing > things. Personally I prefer the approach of putting all the details in > amd.conf rather than on the command line. I have cobbled together the > following to do what you mention here, YMMV. > > rc.conf.local: > amd_enable="YES" # Run amd service with $amd_flags (or > NO). > amd_flags="-F /etc/amd.conf" > > /etc/amd.conf: > [ global ] > # Only search for maps of this type > map_type = file > > # Search this path for maps > search_path = /etc > > # Use this directory for amd's private mount points > auto_dir = /usr/amd/realmounts > > # Check /etc/hosts for hostnames > normalize_hostnames = yes > > # Lock the amd process into memory, improves perf. > plock = no > > # Use the special /default entry in maps > selectors_on_default = yes > > log_file = /var/log/amd.log > log_options = all > > # DEFINE AN AMD MOUNT POINT > [ /mnt/auto ] > map_name = amd.mnta > > /etc/amd.mnta: > /defaults type:=program;fs:=${autodir}/auto/${key};\ > unmount:="/sbin/umount umount ${fs}" > > cdrom mount:="/sbin/mount mount -t cd9660 /dev/acd0c ${fs}";\ > opts:=ro > > floppyd mount:="/sbin/mount mount -t msdos /dev/fd0c ${fs}" > > > You can obviously change the amd mount point (/mnt/auto) and the > physical mount point (/usr/amd/realmounts/auto) if you want to. Whatever > directories you choose, make sure that you create them before you try to > use amd. It is probably not necessary to bury the real mount points so > far > in the filesystem anymore, my configuration is a leftover from the "bad > old days" when a stuck mount would prevent you from doing anything on > the > system because the getcwd() function would hang on the mount if it was > in > a top level directory. On the other hand, since you only have to deal > with > this directory once in a blue moon, I haven't bothered to change it. > > I hope that this helps you get started, and provides some > examples > as to how amd works. It should go without saying that to automount (and > read) a regular cdrom you would do 'ls /mnt/auto/cdrom' for example. > Same > goes for a DOS floppy, via 'ls /mnt/auto/floppyd'. > > > Good luck, > > Doug > -- > "Welcome to the desert of the real." > > - Laurence Fishburne as Morpheus, "The Matrix" -- Si l'image donne l'illusion de savoir C'est que l'adage pretend que pour croire, L'important ne serait que de voir Lofofora To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message