From owner-freebsd-questions@FreeBSD.ORG Sun Oct 12 12:37:57 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89A9816A4B3 for ; Sun, 12 Oct 2003 12:37:57 -0700 (PDT) Received: from regix.com (nas-cbv-6-62-147-172-121.dial.proxad.net [62.147.172.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id C262843FB1 for ; Sun, 12 Oct 2003 12:37:55 -0700 (PDT) (envelope-from regisr@regix.com) Received: from crocoite.home.regix.com (localhost.home.regix.com [127.0.0.1]) by regix.com (8.12.9p2/8.12.9) with ESMTP id h9CJbre2001962 for ; Sun, 12 Oct 2003 21:37:53 +0200 (CEST) (envelope-from regisr@crocoite.home.regix.com) Received: (from regisr@localhost) by crocoite.home.regix.com (8.12.9p2/8.12.9/Submit) id h9CJbrwo001961 for freebsd-questions@freebsd.org; Sun, 12 Oct 2003 21:37:53 +0200 (CEST) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Sun, 12 Oct 2003 21:37:53 +0200 (CEST) Organization: Regix Sender: regisr@crocoite.regix.com From: regis rampnoux To: FreeBSD_Questions Subject: dynamic mount X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2003 19:37:57 -0000 Hello, As the device name of SCSI and USB devices change often I have wrote a small perl script which read a config file which contains : a symbolic name (the mount point too, as in fstab file for mount ;-) the identification and the mount options if any. It do a "camcontrol devlist", found the same substring in the config file which is beetwen the < > and use the da* or cd* to mount the device. Example: in config file: flash:SanDisk ImageMate II:-t msdos The camcontrol reports : at scbus2 target 1 lun 0 (da2,pass4) and the script do mount -t msdos /dev/da2 /flash But may be there is the same function in a standard program or a port? If not, is this script interesting for other users? -- regisr