From owner-freebsd-scsi Tue Oct 20 12:19:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA21540 for freebsd-scsi-outgoing; Tue, 20 Oct 1998 12:19:09 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA21535 for ; Tue, 20 Oct 1998 12:19:09 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id MAA00566; Tue, 20 Oct 1998 12:22:56 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810201922.MAA00566@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: asami@cs.berkeley.edu (Satoshi Asami) cc: scsi@FreeBSD.ORG Subject: Re: for i in disks In-reply-to: Your message of "Tue, 20 Oct 1998 04:43:02 PDT." <199810201143.EAA17327@silvia.hip.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 20 Oct 1998 12:22:55 -0700 From: Mike Smith Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Hi folks, > > I'm thinking about implementing an "autorun"-like mechanism for disks. > The idea is to have a script with a known name on a known position > (say, partition `a' on the first BSD slice) which is called during > boot. The script does something to set up the disk (mount some other > partition, or set up a ccd, or something like that). > > However, to do this, I need to be able to write a loop in /etc/rc* to > iterate through all available disks. I guess devfs when fully > implemented will make this easy ("/devfs/da[0-9]*s?a"?) but my > understanding is that it is not ready yet. I could try mounting all > the nodes in /dev (the ones that are not available will presumably > just fail) but with up to 96 disks per system, that could be a lot of > failures. Nah, it's actually pretty trivial. I would, indeed, just iterate over the available nodes in /dev. When devfs comes along, it'll just get more efficient. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message