Keyboard input / init + questions
tramjoe.merin at gmail.com
Sat Sep 25 03:50:54 PDT 2010
I am using plymouth for a project of mine. Basically, using the script
modules, I have done a theme that among other things displays boot logs in a
pager, and also can display an help screen. When testing, everything works
fine. I can scroll up or down in my pager with the keys 'u' and 'd' and
toggle my help screen with the keypress 'h'.
However, during an actual boot sequence, it seems that my keyboard input
hook does not get any keypress anymore after init switches runlevels. I
tried various ways to debug this, but it really seems to happen in init
itself. Pausing at the begin and end of /etc/init.d/rc proves that
everything still works just before the script exits after rcS.d scripts have
been run, and are already gone sour before rc executes the rc2.d scripts.
I have tried disabling every getty in runlevel 2 from inittab, but this does
I am resorting to use only a single runlevel for my project (not a big deal,
it is an embedded OS with only a read-only live filesystem) in order to
circumvent this, but it would be nice if someone more used to plymouth code
could take a look at this. The problem is reproductible with debian squeeze
packages. If you need more details, please just ask.
I also have a couple of questions regarding plymouth features:
- Is there a way to check the keypress callback function argument for
non-string keys like arrows ? When trying to get their value, I always get
errors that seem to indicate the contents are not string, but I do not have
any other type/predefs values to check them against.
- Is there a way to call up an external binary from plymouth, like a
system() function ? If not, I guess this would not be much to add, I can do
it if you give me a proper pointer in your code (hints on the proper parse
token to use, etc.).
- I desperately miss a couple of possibilities regarding strings, like
determining a string length, and addressing strings as lists (a="foobar";
c=a), thus making it possible to do strings transformations, iterate on
strings, etc. Did I miss something ? Would that be hard to implement ?
- Last, but related to the previous, I currently keep an index on lists I
create to knopw their length before iterating on them, but it would be nice
to have a mylist.Len() method.
Can any of the two previous points be done with a "list | " method of
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the plymouth