From owner-freebsd-usb@FreeBSD.ORG Thu Aug 28 16:10:02 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26C83106564A for ; Thu, 28 Aug 2008 16:10:02 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id B5C348FC17 for ; Thu, 28 Aug 2008 16:10:01 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=4WCD8KwRn_EA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=v1mGmhcigQ52SgSPJWcA:9 a=8YRBGTGzgz4kG8QNz4NlD0MNxHEA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 314785594; Thu, 28 Aug 2008 18:09:59 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 28 Aug 2008 18:11:46 +0200 User-Agent: KMail/1.9.7 References: <200808280746.m7S7kuJV018511@banyan.cs.ait.ac.th> In-Reply-To: <200808280746.m7S7kuJV018511@banyan.cs.ait.ac.th> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808281811.46885.hselasky@c2i.net> Cc: Subject: Re: How to eject an USB disk on FreeBSD X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2008 16:10:02 -0000 On Thursday 28 August 2008, Olivier Nicole wrote: > Hello, > > Is there a command in FreeBSD that ejects a USB disk like in Windows? > > I mount the USB disk with automount daemone (amd). > > I have a script that access this disk and force an umount at the end > of the script. > > But anyone accessing the disk will have amd re'mount the disk and at > the time I unplu the disk, problem may occur because the disk is still > mounted and in use. > > I would like to have a command that makes the disk/USB port physically > inaccessible, so at the end of the script a user cannot access the > disk again. > > Like in Windows after stopping a USB mass storage device, one has to > unplg and replug the disk if he wants to access it again. > Hi, Maybe the following will help: man camcontrol --HPS