On Tue, 2009-07-14 at 13:30 +0200, Kay Sievers wrote:
> On Tue, Jul 14, 2009 at 09:24, Martin Pitt<martin.
> If it makes stuff easier, there is (since a long time) a "REMOVE_CMD"
> in standard udev rules. A rule from any event can define a command to
> run when the device goes away:
> 95-udev-late.rules:
> ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
So that can be set using IMPORT on the "add" action?
I think this is what's required then:
1. udev-configure-printer:
C program
udev invokes it with IMPORT+="..." to remember Device ID
Operation:
Fetch Device ID
Decide whether we have a queue configured
(Note, during boot cupsd may not have started yet so we'll
need to retry)
For ACTION=="add":
If queue configured but disabled (by us), enable it
If queue not configured, invoke udev-add-printer (see below)
For ACTION=="remove":
If queue configured and enabled, disable it
2. udev-add-printer:
Python program (so it can use cupshelpers)
"Add printer" parts of hal_lpadmin
Tim.
*/
signature.asc
Description: This is a digitally signed message part
_______________________________________________ devkit-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/devkit-devel
