From owner-freebsd-usb@FreeBSD.ORG Thu Aug 28 08:17:40 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 C2B291065670 for ; Thu, 28 Aug 2008 08:17:40 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) by mx1.freebsd.org (Postfix) with ESMTP id 1EB828FC2D for ; Thu, 28 Aug 2008 08:17:39 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) by mail.cs.ait.ac.th (8.13.1/8.13.1) with ESMTP id m7S7ku9N058690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 28 Aug 2008 14:46:56 +0700 (ICT) (envelope-from on@banyan.cs.ait.ac.th) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.14.2/8.12.11) id m7S7kuJV018511; Thu, 28 Aug 2008 14:46:56 +0700 (ICT) Date: Thu, 28 Aug 2008 14:46:56 +0700 (ICT) Message-Id: <200808280746.m7S7kuJV018511@banyan.cs.ait.ac.th> From: Olivier Nicole To: freebsd-usb@freebsd.org X-Virus-Scanned: on CSIM by amavisd-milter (http://www.amavis.org/) Subject: 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 08:17:40 -0000 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. TIA, Olivier