Linux Hotplug development
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: RUN
Date: Wed, 11 Jul 2007 01:08:18 +0000	[thread overview]
Message-ID: <1184116098.2560.95.camel@lov.localdomain> (raw)
In-Reply-To: <4693ECED.9090209@inguin.com>

On Tue, 2007-07-10 at 20:59 -0400, Richard Michael wrote:
> > Today you can have only one RUN key, it will change some day, but I
> > never got to finish the smarter rule parsing which will allow any
> > number of keys in a rule.
> > 
> > You need to do:
> >    RUN+="/bin/sh -c '/program1; /program2'"
> > for now.
> 
> I have misunderstood either the poster's question or the paragraph in
> "man udev" discussing the RUN key:
> 
> ----excerpt----
> RUN
> 
>   Add a program to the list of programs to be executed for a specific
> device. This can only be used for very short running tasks.  Running an
> event process for a long period of time may block all further events for
> this or a dependent device. Long running tasks need to be immediately
> detached from the event process itself.
> 
> ----excerpt----
> 
> For example, this works:
> 
> SUBSYSTEM="*", RUN+="/root/udev-catch-remove"
> ENV{DEVNAME}="/dev/foobar", RUN+="/path/to/prog"
> 
> Is this only working because the match keys are different?

These are two rules with independent RUN keys, right?

The first on runs for _every_ event as the SUBSYSTEM match doesn't do
anything. The second may run when the env matches, but $DEVNAME is
usually not available at the time of rule processing. You can have any
number of rules with _one_ RUN key per rule and they will all be
executed.

The question was how to run two programs from a _single_ rule. The
obvious solution would be to specify two RUN keys, but that doesn't work
with todays in-memory rule presentation. It will change when I find the
time to work on that.

Thanks,
Kay


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

  parent reply	other threads:[~2007-07-11  1:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10 20:32 RUN Adam Kane
2007-07-10 22:01 ` RUN Bauke Jan Douma
2007-07-10 22:08 ` RUN Adam Kane
2007-07-11  0:04 ` RUN Kay Sievers
2007-07-11  0:59 ` RUN Richard Michael
2007-07-11  1:08 ` Kay Sievers [this message]
2007-07-11  2:11 ` RUN Bryan Kadzban
2007-07-11  8:36 ` RUN Scott James Remnant
2007-07-11 13:12 ` RUN Richard Michael
2007-07-13  0:10 ` RUN Adam Kane

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=1184116098.2560.95.camel@lov.localdomain \
    --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