From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zack Weinberg" Date: Fri, 26 Aug 2005 03:06:05 +0000 Subject: Re: RUN rules to enable/disable printer queues Message-Id: <33489.66.92.218.83.1125025565.squirrel@mail.panix.com> List-Id: References: <32962.66.92.218.83.1125017033.squirrel@mail.panix.com> In-Reply-To: <32962.66.92.218.83.1125017033.squirrel@mail.panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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