For those of us with 2.4 kernel and NO OTHER SCSI DISK, Here's the beginning 
of an idea;  (Pardon my naff bash skills):

        fdisk -l | grep "Disk /dev/sd" | cut -d" " -f2 | sed s/:/1/

returns the device that has grabbed the flash drive.  

so I guess 
        
        mount `fdisk -l | grep "Disk /dev/sd" | cut -d" " -f2 | sed s/:/1/` /thumbdrive

should do it.  

Well, waddaya know?  Works for me!  MY FIRST BASH SCRIPT  (I'm so proud!)

Only works as root, of course, so what we need is an entry in fstab that allows users
to mount it (is there another way?).  There the logic fails, f'rinstance 
        /dev/sda1 /thumbdrive_a  . . . 
        /dev/sdb1 /thumbdrive_b  . . . 
doesn't appeal at all, 'cos there's no consistent mount for any other scripts or user 
familiarity.  

Ideas, anyone?




On Tue, 31 Aug 2004 17:31:56 +1200
Matthew Gregan <[EMAIL PROTECTED]> wrote:


. . . [SNIP] . . .
> reboot it will begin at /dev/sdb or whatever is the first free SCSI
> disk device node.  Your worry is real and your backup script should
> deal with it.
> 
> I suggest you look into a reliable method to identify the newly
> attached USB storage device.  Since you've mentioned that you're
. . . [SNIP] . . .



-- 
Alasdair Tennant
Dunedin
New Zealand

Reply via email to