From owner-freebsd-questions@FreeBSD.ORG Wed Mar 11 15:11:16 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF1C81065687 for ; Wed, 11 Mar 2009 15:11:16 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from exprod7og108.obsmtp.com (exprod7og108.obsmtp.com [64.18.2.169]) by mx1.freebsd.org (Postfix) with SMTP id 8FC248FC1C for ; Wed, 11 Mar 2009 15:11:16 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from source ([209.85.198.245]) by exprod7ob108.postini.com ([64.18.6.12]) with SMTP ID DSNKSbfUlNeROtSy/QTNAyHD4gKHsBS99mEZ@postini.com; Wed, 11 Mar 2009 08:11:16 PDT Received: by rv-out-0708.google.com with SMTP id c5so39635rvf.32 for ; Wed, 11 Mar 2009 08:11:16 -0700 (PDT) Received: by 10.141.176.6 with SMTP id d6mr4429787rvp.175.1236784275786; Wed, 11 Mar 2009 08:11:15 -0700 (PDT) Received: from localhost ([76.231.178.131]) by mx.google.com with ESMTPS id l31sm23274132rvb.5.2009.03.11.08.11.15 (version=SSLv3 cipher=RC4-MD5); Wed, 11 Mar 2009 08:11:15 -0700 (PDT) Date: Wed, 11 Mar 2009 08:10:46 -0700 (PDT) From: Peter Steele To: questions@freebsd.org Message-ID: <20138265.681236784246466.JavaMail.HALO$@halo> In-Reply-To: <21664605.661236783895798.JavaMail.HALO$@halo> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: How to auto-detect a USB drive? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2009 15:11:17 -0000 >My question to you would be: What exactly do you mean by >"automatically detect"? The drive *is* automatically detected. >Should it be mounted afterwards? Yeah, I guess my wording was a little vague. I know that the system automatically detects when a USB drive is inserted, and creates the appropriate entries under /dev. I want to follow this up with having the drive automatically mounted, and I'll then examine the USB drive for specific files I expect to be present, and possible run something that's installed on the disk, then unmount the disk. We want to use this approach to deploy our software on large clusters of machines that may not have an IP identity. >You can use automounters to automatically mount devices when >they appear. In order how to determine file systems, slices >and partitions on such an USB device, you could, for example, >have a look at how FreeSBIE does it. If I can hook into an event that signals when a USB disk is inserted, I can take care of verifying the disk is in the format we expect it to be. >Additionally, there are already tools integrated in KDE and >Gnome that automount USB devices. Our boxes have no GUI so these may not work for us. We have a more specific application though and do not need a general purpose automounter. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...