From: Stefanos Harhalakis <v13@it.teithe.gr>
To: linux-hotplug@vger.kernel.org
Subject: Re: add an option for rules to be run after a device is created
Date: Wed, 04 Jan 2006 15:37:00 +0000 [thread overview]
Message-ID: <200601041737.02374.v13@it.teithe.gr> (raw)
In-Reply-To: <200601041620.48749.v13@it.teithe.gr>
On Wednesday 04 January 2006 16:49, Kay Sievers wrote:
> On Wed, Jan 04, 2006 at 04:20:47PM +0200, Stefanos Harhalakis wrote:
> > Hi there,
> >
> > I'm using udev and I'd like to make a suggestion. I have these rules:
> >
> > BUS="ide", KERNEL="*[!0-9]", PROGRAM="/etc/udev/scripts/get_serial %k",
> > RESULT="WD-WMAEH1157379", SYMLINK="disk/root"
> > BUS="ide", KERNEL="*[0-9]", PROGRAM="/etc/udev/scripts/get_serial %k",
> > RESULT="WD-WMAEH1157379", SYMLINK="disk/root%n"
> >
> > which call a script that return the hard disk serial number using hdparm.
> > I'm using this rule to find the root disk and enable its swap partition
> > without knowing the device name.
> >
> > The problem is that the get_serial script is run before (for
> > example) /dev/hda is created and hdparm cannot find the device (/dev is a
> > tmpfs). This can be solved by running udevstart twice but I believe that
> > there can be a better solution.
>
> Use the persistent disk links in /dev/disk/, they will just work.
I'm sorry about this. It seems that all I wanted was the %N ($tempnode), which
I just found because of your reply.
Thanks a lot for your time!
<<V13>>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=click
_______________________________________________
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
prev parent reply other threads:[~2006-01-04 15:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-04 14:20 add an option for rules to be run after a device is created Stefanos Harhalakis
2006-01-04 14:49 ` Kay Sievers
2006-01-04 15:37 ` Stefanos Harhalakis [this message]
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=200601041737.02374.v13@it.teithe.gr \
--to=v13@it.teithe.gr \
--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).