Making directories from a rule
Hi all :)
I'll try to explain this shortly: I have some rules that assign new
"NAME"'s to some devices, namely external USB hard disks. Currently, I have subdirs in my /media dir for all of them, but since I use hard disks from my friends from time to time, the list is growing a bit. So, instead of having all those dirs created, I would like to have udev to make the directories for me.
My problem is that I must have a separate rule to make the dir for
every and each device, since a generic rule, like 'ACTION="add", ..., RUN+="/bin/mkdir /media/%k"' won't work (it takes the original kernel name, like sde1, instead of the changed name, like bigdisk).
So far, the only solution, apart of having a rule for every and each
different device, is to have an external program doing all the translations and use "%c".
Is there any way of using the changed NAME in a posterior rule to
create the dirs without having to resort to use environment variables or an external program to do the naming?
Thanks :))))
Raúl Núñez de Arenas Coronado
Signature · 12 lines
Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen! ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel