[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

udev, init.d and a daemon



Hello,

I've a problem designing a boot script, and I find no example.

The problem:
- Logitech G15 (and like) USB keyboards have a LCD display and few
  (or lots) extra keys
- g15daemon is a deamon need to handle the display, and to handle the
  extra keys in xorg (xkb-data (>= 0.9+cvs.20070428-1) )
- g15daemon requires the kernel module uinput, to push back the
  extra keys (after decoding it, according to keyboard version)

Actual solution:
- a standard init.d script, which start and stop a deamon

Now I'm thinking/writing about a event based rule (with udev) which
handles also some short disconnection of USB bus on some systems.

Problems:
- How to force the deamon to be loaded BEFORE xorg in insserv?
  I don't find a "before of" dependency in LSB headers
- How to handle the common case: keyboard is already attached
  (daemon is in /usr filesystem), with udev.
- How to load uinput module?  Actually I modprobe and I pool
  to see if the device is created, every 0.1 seconds for 5 seconds.
  Note this could be done concurrently detaching the command, but
  anyway is not event based as I would like.

any suggestions/example?
How would it work on upstart?

Notes:
- actually g15daemon doesn't support multiple keyboards, but
  libg15 library does.
- init.d script is still need for shutdown phase

ciao
	cate




Reply to: