udev-ish replacement for hal-cups-utils?
martin.pitt at ubuntu.com
Thu Jul 16 01:26:14 PDT 2009
Till Kamppeter [2009-07-14 18:54 +0200]:
> Is there no possibility for the Python program to write info back
> into the udev database/environment?
As I said, there is, if you use IMPORT instead of RUN. Then the
callout can print "VARIABLE=value" lines to stdout, which then get
However, please, pretty pretty please don't use Python programs as
udev callouts. They are on the critical boot path, and take an awful
amount of time to start, compile, and run. The actual callout should
just check if you already know that printer, etc. This should be
doable in 10 lines of shell, or a couple of lines of C code. Only if
the printer isn't known and needs to be configured, then the full
s-c-p Python magic can be invoked; that way, you have the huge startup
cost penalty only once.
> Does libgudev allow to write stuff back into the udev database?
No, only IMPORTed callouts.
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the devkit-devel