Dear all,
I'm trying to mount a custom device node for each usb port of my pc. For example:
Every pen drive connected to my usb 1-1.2 will be called /dev/usb2 and mounted on /mnt/usb2, on usb 1-1.3 port the device node will be called /dev/usb3 and mounted on /mnt/usb3.
I'm using an embedded linux, the device handler is mdev. Editing mdev.rules I'm able to manage new devices and write special rules for them (on /bin/hotplug.sh I can mount the /dev/udisk device on anywhere I wanna):
Code:
# This will be called after scsi emulation, so the
# new device (sda1, sdb1 ...) will be managed by /bin/hotplug.sh
mmcblk0p1 0:0 0600 =sdcard */bin/hotplug.sh
sda1 0:0 0600 =udisk * /bin/hotplug.sh
# This is called when pen drive is connected
1-1.* 0:0 0600 @ /home/lobinho/showdevice.sh $MDEV
The problem is that SCSI emulation define to me the name of the device in order of insertion (following an alphabetical sequence):
/dev/sda
/dev/sdb
/dev/sdc
...
Is there anyway to change scsi emulation configurations or code?
I want to call my pen drive on my way (/dev/usb1 instead of /dev/sd*)!
Someone knows any tip or tutorial that will help me?
Thanks in advance!