I'm trying to create a udev rules that mount my USB CF reader to a specific /dev entry when it is connected in a specific port.
My 1st problem is that for some reason the ID of the USB port keeps changing, making my CF reader not recognizable by the system why is my system doing this??? The rules below works, but it is not consistent because of the ID change my system faces. If the USB ID is not consistent everytime I reboot, what would be? Note that I use different reader from time to time, therefore the udev PRODUCT ID would not be a solution.
The reason I'm creating such a udev rules....
Since I have a SATA drive in this computer it gets the "mapped" as /dev/sda, I have to find a way to mount CF card reader now and then from a script that I use. The problem is that for some reason, the device don't always get mapped as /dev/sdb. So I have to create a rule to have a consistent name (in my rule below: flashport1 or 2). I don't know if all this make sense, feel free to ask questions.
Code:
This is the command line I use to find out the ID of the USB port.
#udevinfo -a -p $(udevinfo -q path -n /dev/sdb1)
These are my rules, I have no choice to put many ID as they change for no reason.
BUS=="usb", ID=="6-4:1.0", NAME="flashport1" MODE="0644" OPTIONS+="all_partitions"
BUS=="usb", ID=="6-3:1.0", NAME="flashport2" MODE="0644" OPTIONS+="all_partitions"
BUS=="usb", ID=="1-3:1.0", NAME="flashport1" MODE="0644" OPTIONS+="all_partitions"
BUS=="usb", ID=="1-4:1.0", NAME="flashport2" MODE="0644" OPTIONS+="all_partitions"
BUS=="usb", ID=="3-3:1.0", NAME="flashport1" MODE="0644" OPTIONS+="all_partitions"
BUS=="usb", ID=="3-4:1.0", NAME="flashport2" MODE="0644" OPTIONS+="all_partitions"
Thanks
Claude