From: "Zack Weinberg" <zackw@panix.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: RUN rules to enable/disable printer queues
Date: Fri, 26 Aug 2005 03:06:05 +0000 [thread overview]
Message-ID: <33489.66.92.218.83.1125025565.squirrel@mail.panix.com> (raw)
In-Reply-To: <32962.66.92.218.83.1125017033.squirrel@mail.panix.com>
Kay Sievers said:
> Use two rules, one for ACTION="add" and one for "remove" if you want to
> name the device at the same time. The SYMLINK key prevents rule to be
> catched by a "remove" cause it is only valid to _create_ a link - same
> for NAME, OWNER, GROUP, MODE.
Okay, so now I have
BUS="usb", SYSFS{product}="Lexmark Optra E310", \
SYSFS{serial}="0101137", ACTION="remove", \
RUN+="/etc/udev/scripts/lpqueue.sh"
BUS="usb", SYSFS{product}="Lexmark Optra E310", \
SYSFS{serial}="0101137", ACTION="add", \
SYMLINK="lp_epson", RUN+="/etc/udev/scripts/lpqueue.sh"
... and it still doesn't work: lpqueue.sh is invoked only on add, not remove.
Even if it did work, I would not be happy about having to duplicate the
BUS=..., SYSFS{product}=..., SYSFS{serial}=... piece. The constraint
you describe (SYMLINK, NAME, etc. implicitly restricting rules to add
events) is silly, because RUN= may do something useful with that
information on remove events as well (or could, if it were all being put
into the environment, as it ought to be).
zw
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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:[~2005-08-26 3:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-26 0:43 RUN rules to enable/disable printer queues Zack Weinberg
2005-08-26 1:01 ` Kay Sievers
2005-08-26 3:06 ` Zack Weinberg [this message]
2005-08-26 11:46 ` Kay Sievers
2005-08-26 15:50 ` Ian Pilcher
2005-08-26 19:36 ` Kay Sievers
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=33489.66.92.218.83.1125025565.squirrel@mail.panix.com \
--to=zackw@panix.com \
--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).