udev-ish replacement for hal-cups-utils?

Tim Waugh twaugh at redhat.com
Thu Jul 16 09:31:43 PDT 2009


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.
*/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/devkit-devel/attachments/20090716/f451575f/attachment.pgp 


More information about the devkit-devel mailing list