From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Problem parsing %s in udev rules
Date: Wed, 06 Oct 2004 23:50:32 +0000 [thread overview]
Message-ID: <20041006235032.GA11935@vrfy.org> (raw)
In-Reply-To: <1097105584.9273.9.camel@bluto.andrew>
On Wed, Oct 06, 2004 at 05:33:04PM -0600, Andrew Patterson wrote:
> Udev seems to be chopping off anything seen in a rule after a %s. For
> example, if I have the following rule:
>
> BUS="scsi", KERNEL="sd*", PROGRAM="/sbin/scsi_id", NAME="%k",
> SYMLINK="scsi_disks/some-proceeding-stuff-%s{model}-some-following-
> stuff"
>
> Everything after the %s{model} is ignored.
>
> Furthermore, everything in model following whitespace is ignored as
> well. I.e, if model contains "HP 34.7G", the resulting device file
> created is /dev/scsi_disks/some-proceeding-stuff-HP.
>
> I used the following command to run this test:
>
> # DEVPATH=/block/sda ACTIONd ./udev block
>
> I also get the same behavior when using udevstart (patched to fix
> parameter passing problems).
If your sysfs value contains spaces, which is the delimiter for multiple
symlinks, it will not work.
udev can't do this now, you need to wrap the call with an external script,
which ensures sane values.
Kay
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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
next prev parent reply other threads:[~2004-10-06 23:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-06 23:33 Problem parsing %s in udev rules Andrew Patterson
2004-10-06 23:50 ` Kay Sievers [this message]
2004-10-07 0:23 ` Andrew Patterson
2004-10-07 0:30 ` Kay Sievers
2004-10-12 23:04 ` Andrew Patterson
2004-10-12 23:58 ` Greg KH
2004-10-13 23:13 ` Andrew Patterson
2004-10-13 23:56 ` Greg KH
2004-10-14 20:05 ` Andrew Patterson
2004-10-15 18:45 ` Greg KH
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=20041006235032.GA11935@vrfy.org \
--to=kay.sievers@vrfy.org \
--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).