From owner-freebsd-questions Mon Jan 31 22:53:59 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dt051n0b.san.rr.com (dt051n0b.san.rr.com [204.210.32.11]) by builder.freebsd.org (Postfix) with ESMTP id 383773D12 for ; Mon, 31 Jan 2000 22:53:53 -0800 (PST) Received: from slave (slave [10.0.0.1]) by dt051n0b.san.rr.com (8.9.3/8.9.3) with ESMTP id TAA01183; Mon, 31 Jan 2000 19:12:57 -0800 (PST) (envelope-from Doug@gorean.org) Date: Mon, 31 Jan 2000 19:12:53 -0800 (PST) From: Doug Barton X-Sender: doug@dt051n0b.san.rr.com To: Peter Schwenk Cc: Paul Orr , freebsd-questions@freebsd.org Subject: Re: amd....kill me please In-Reply-To: <3895F3A7.397A4510@math.udel.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 31 Jan 2000, Peter Schwenk wrote: > Where do you go to even get enough information to start? The man page > sux^H^H^H is horrible. I want to use amd to automatically mount CDROMs and > floppies. 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" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message