From mboxrd@z Thu Jan 1 00:00:00 1970 From: DervishD Date: Fri, 29 Jun 2007 08:15:02 +0000 Subject: Making directories from a rule Message-Id: <20070629081502.GA7988@DervishD> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org 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=3D"add", ..., RUN+=3D"/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=FAl N=FA=F1ez de Arenas Coronado --=20 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 Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel