Help writing a Udev rule
i need some help with writing a udev rule.
I run a ubuntu box headless. On it, I run some scripts detecting various media types inserted and then I import or export content.
I have a card reader wired to onboard USB. Normally on boot this shows up as /dev/sdb and then when a card is inserted it lists /dev/sdb1 etc.
I also insert a usb drive which shows up as /dev/sdc1 etc.
All of my scripts are fixed to those /dev points
problem: If i have a USB HDD plugged in and i reboot, the usb hdd gets pulled in first and lands at /dev/sdb then the card reader at /dev/sdc - i.e. the reverse of how all of my scripts expect them to be.
So, I need some help in writing a udev rule that would ensure that they both always get the same /dev point.
I can pull all of the ids etc no problem with sysinfo etc, just need a clear pointer as to what my udev rule should look like. I have spent some time with the man pages, just having trouble with specifics.
thanks in advance
How about a HOWTO called "Writing UDEV Rules": http://www.reactivated.net/writing_udev_rules.html
PS: www.google.com/linux is a great help in the search for instructions, howtos, etc.
|All times are GMT -5. The time now is 08:38 AM.|