linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Making directories from a rule
@ 2007-06-29  8:15 DervishD
  0 siblings, 0 replies; only message in thread
From: DervishD @ 2007-06-29  8:15 UTC (permalink / raw)
  To: linux-hotplug

    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

-- 
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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-29  8:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29  8:15 Making directories from a rule DervishD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).