From owner-freebsd-questions@FreeBSD.ORG Wed Mar 11 14:44:01 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 90116106564A for ; Wed, 11 Mar 2009 14:44:01 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from exprod7og114.obsmtp.com (exprod7og114.obsmtp.com [64.18.2.215]) by mx1.freebsd.org (Postfix) with SMTP id E87798FC0C for ; Wed, 11 Mar 2009 14:43:55 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from source ([209.85.198.243]) by exprod7ob114.postini.com ([64.18.6.12]) with SMTP ID DSNKSbfOKAyT0CbJvvUoD0nS+Vx2QagH+Mwm@postini.com; Wed, 11 Mar 2009 07:43:56 PDT Received: by rv-out-0708.google.com with SMTP id k29so28681rvb.50 for ; Wed, 11 Mar 2009 07:42:33 -0700 (PDT) Received: by 10.141.52.3 with SMTP id e3mr4411548rvk.265.1236782553878; Wed, 11 Mar 2009 07:42:33 -0700 (PDT) Received: from localhost ([76.231.178.131]) by mx.google.com with ESMTPS id f21sm16386998rvb.2.2009.03.11.07.42.33 (version=SSLv3 cipher=RC4-MD5); Wed, 11 Mar 2009 07:42:33 -0700 (PDT) Date: Wed, 11 Mar 2009 07:42:04 -0700 (PDT) From: Peter Steele To: questions@freebsd.org Message-ID: <10423240.561236782522127.JavaMail.HALO$@halo> In-Reply-To: <7280394.541236782303889.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: 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 14:44:01 -0000 I want to have a process running on my FreeBSD box that automatically detects when a USB drive is inserted. What's the easiest way to accomplish this? I know I could simply monitor /var/log/messages and look for the appropriate events to appear, but is there a more elegant way?