assign device name to USB key after assigning device name to hard disk.
Hi All,
In my PC i have 3 hard disk connected and auto-mount of USB key is not allowed.
But we have an exceptional case, to mount USB key if it has some content in it , this content is pre-defined.
For Example, mount USB key if it has 2 files "File1.txt" & "File2.txt" else do not mount it.
i have written USB rule, this rule runs every time USB key is connected. This rule then call script. This script internally mount the USB key, check for the "File1.txt" & "File2.txt" presence. If present then mount USB key to different mount location, else un-mount the USB Key.
below is my problem:
1. i have a USB key which has "File1.txt" and "File2.txt" as content.
2. During reboot, my USB rule is triggered and USB key is mounted.
3. So USB get assigned device type as "/dev/sda". while other 3 hard disk get assigned as below
hard disk 1 = /dev/sdb
hard disk 2 = /dev/sdc
hard disk 3 = /dev/sdd
instead i want my hard disk to get device name from "/dev/sda"... and assign device name to USB key at last.
please suggest how can i do this.
Thank in advance.
|