Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 2003 21:37:53 +0200 (CEST)
From:      regis rampnoux <regisr@pobox.com>
To:        FreeBSD_Questions <freebsd-questions@freebsd.org>
Subject:   dynamic mount
Message-ID:  <XFMail.20031012213753.regisr@pobox.com>

next in thread | raw e-mail | index | archive | help
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 :
<SanDisk ImageMate II 1.30>        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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20031012213753.regisr>