From: DervishD <udev@dervishd.net>
To: linux-hotplug@vger.kernel.org
Subject: Making directories from a rule
Date: Fri, 29 Jun 2007 08:15:02 +0000 [thread overview]
Message-ID: <20070629081502.GA7988@DervishD> (raw)
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
reply other threads:[~2007-06-29 8:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070629081502.GA7988@DervishD \
--to=udev@dervishd.net \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).