Send plymouth mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freedesktop.org/mailman/listinfo/plymouth
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of plymouth digest..."
Today's Topics:
1. Re: Keyboard input / init + questions (Jerome Martin)
2. Re: Keyboard input / init + questions (Ray Strode)
3. Re: Keyboard input / init + questions (Charlie Brej)
----------------------------------------------------------------------
Message: 1
Date: Tue, 28 Sep 2010 00:33:23 +0200
From: Jerome Martin <[email protected]>
Subject: Re: Keyboard input / init + questions
To: Charlie Brej <[email protected]>
Cc: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Hi Charlie,
On Mon, Sep 27, 2010 at 8:01 PM, Charlie Brej <[email protected]> wrote:
> Sorry about the delay. I'll try and answer as many questions aimed for me
> as I find, but I will probably have missed some.
No problem.
>
> On 09/25/2010 11:50 AM, Jerome Martin wrote:
>
>> - 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.).
>>
>
> Yes possible, although I would recommend using the on keystroke execute
> command feature rather than letting a plugin run anything it likes. At least
> that way you can be sure what state the system is in.
Well, this will be under control :-)
I just need a small menu (not a problem to implement) that asks a couple of
questions and pass the answers to a couple of config scripts. The system is
a cluster node that boots from a live system image, reads a persistent
config partition and autoconfigures itself. But for seeding the cluster, or
in corner cases, I need some interaction with the user to help seed the
config, and I want to use plymouth for that.
>
>
> - I desperately miss a couple of possibilities regarding strings, like
>> determining a string length, and addressing strings as lists
>> (a="foobar"; c=a[2]), thus making it possible to do strings
>> transformations, iterate on strings, etc. Did I miss something ? Would
>> that be hard to implement ?
>>
>
> Ah! So there are two functions that do this. "CharAt" and "SubString".
> Somehow, I forgot to add these to the wiki.
>
> "String".CharAt(2) => "r"
> "String".SubString(2, 4) => "rin"
>
> I think it is indexed starting at zero and the SubString takes inclusive
> start and end pointers.
Yes, meanwhile, as I said in a later email, I noticed those in the code. I
will add a String.Len() method for my needs an be all set.
>
>
> - 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.
>>
>
> Are you just appending to a list by adding elements at increasing indices?
> list[0] = "blah", list[1]="sdf"...
> In which case you can just add a length element and keep that up to date
> when you add/remove elements. (list.length++ or list["length"]++)
This is what I do right now, I do the housekeeping in my script for an
separate length variable. But now that I have added a couple of additional
methods to plymouth script modu;e, I know how trivial it is to add that kind
of thing, so I'll just do it when I do not feel to lazy/when the need is
immediate.
>
> Can any of the two previous points be done with a "list | []" method of
>> sorts ?
>>
>
> Not really. That's a rather complex one to explain.
>
<nod>
>
> > Things using "\033"
>
> There is no escaping supported in the scripted system apart from \n \" and
> \0.
>
> Ok, sorry, just found your patch. I'm split between \123 and \x123.
>
Mhhh, I hesitated too but settled for C-like behavior.
We can make it nicer and easily support at the same time \0, \XYZ with XYZ
in octal, even \XY if we add a lookahead function for the n next chars that
do not shift the current char pointer.
>
> Are there other questions I have missed?
I think that's all, actually I solved most of it meanwhile :-)
The code is pretty clear when you get into it. It only lacks a bit of user
docs.
What do you think about having a switch to hand ctrl-V, esc, etc either to
the script or to the main.c code depending on the user needs ? that would
allow me to submit something that could go in your git repo for my ANSI key
handling logic. I could even add some examples from my code, like a log
viewer that supports scrolling with up/down, things like that.
Best Regards,
--
J?r?me Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.freedesktop.org/archives/plymouth/attachments/20100928/2a5edb48/attachment.htm>
------------------------------
Message: 2
Date: Tue, 28 Sep 2010 13:41:19 -0400
From: Ray Strode <[email protected]>
Subject: Re: Keyboard input / init + questions
To: Jerome Martin <[email protected]>
Cc: plymouth <[email protected]>
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=UTF-8
Hi,
On Mon, Sep 27, 2010 at 6:20 PM, Jerome Martin
<[email protected]> wrote:
> Bingo, I never actually quit plymouth this explain why I did not get the
> logs :-)
> Please find the log file attached :-)
So, I'm seeing some strangeness in the fidelity of the logs. It seems
like ply-logger may have a bug in it, which is unfortunate...
Anyway, looking at the output, I see:
[ 38.755306] [main.c]
on_display_message:displaying message Running scripts in rcS.d/ took 4
seconds.
[...]
[ 38.794012] [ply-terminal.c]
on_tty_disconnected:tty disconnected (fd 10)
[ 38.794015] [ply-terminal.c]
on_tty_disconnected:trying to reopen terminal '/dev/tty1'
[...]
[ 38.794021] [./plugin.c]
on_input_source_disconnected:input source disconnected, reopening
So it looks like both parts of the code that are supposed to notice
the tty going away, do it notice it going away, and then both parts
reopen without any error messages.
Can you post the output of
sudo stty -a --file=/dev/tty1
after the keyboard is stolen away but before qutting plymouth? Also
the output of
ls -l /proc/$(/sbin/pidof plymouthd)/fd
would be useful. I may have to do a debian install and try to
reproduce to make head way on this issue though. If I do go that
route, tips on how to recreate your reproduction environment would be
useful.
--Ray
------------------------------
Message: 3
Date: Tue, 28 Sep 2010 19:06:44 +0100
From: Charlie Brej <[email protected]>
Subject: Re: Keyboard input / init + questions
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 09/27/2010 11:33 PM, Jerome Martin wrote:
> Hi Charlie,
>
> On Mon, Sep 27, 2010 at 8:01 PM, Charlie Brej <[email protected]
> <mailto:[email protected]>> wrote:
>
> Sorry about the delay. I'll try and answer as many questions aimed
> for me as I find, but I will probably have missed some.
>
>
> No problem.
>
>
>
> On 09/25/2010 11:50 AM, Jerome Martin wrote:
>
> - 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.).
>
>
> Yes possible, although I would recommend using the on keystroke
> execute command feature rather than letting a plugin run anything it
> likes. At least that way you can be sure what state the system is in.
>
>
> Well, this will be under control :-)
> I just need a small menu (not a problem to implement) that asks a couple
> of questions and pass the answers to a couple of config scripts. The
> system is a cluster node that boots from a live system image, reads a
> persistent config partition and autoconfigures itself. But for seeding
> the cluster, or in corner cases, I need some interaction with the user
> to help seed the config, and I want to use plymouth for that.
>
>
>
> - I desperately miss a couple of possibilities regarding
> strings, like
> determining a string length, and addressing strings as lists
> (a="foobar"; c=a[2]), thus making it possible to do strings
> transformations, iterate on strings, etc. Did I miss something ?
> Would
> that be hard to implement ?
>
>
> Ah! So there are two functions that do this. "CharAt" and
> "SubString". Somehow, I forgot to add these to the wiki.
>
> "String".CharAt(2) => "r"
> "String".SubString(2, 4) => "rin"
>
> I think it is indexed starting at zero and the SubString takes
> inclusive start and end pointers.
>
>
> Yes, meanwhile, as I said in a later email, I noticed those in the code.
> I will add a String.Len() method for my needs an be all set.
>
>
>
> - 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.
>
>
> Are you just appending to a list by adding elements at increasing
> indices? list[0] = "blah", list[1]="sdf"...
> In which case you can just add a length element and keep that up to
> date when you add/remove elements. (list.length++ or list["length"]++)
>
>
> This is what I do right now, I do the housekeeping in my script for an
> separate length variable. But now that I have added a couple of
> additional methods to plymouth script modu;e, I know how trivial it is
> to add that kind of thing, so I'll just do it when I do not feel to
> lazy/when the need is immediate.
>
>
> Can any of the two previous points be done with a "list | []"
> method of
> sorts ?
>
>
> Not really. That's a rather complex one to explain.
>
>
> <nod>
>
>
> > Things using "\033"
>
> There is no escaping supported in the scripted system apart from \n
> \" and \0.
>
> Ok, sorry, just found your patch. I'm split between \123 and \x123.
>
>
> Mhhh, I hesitated too but settled for C-like behavior.
Yeah the \123 is more standard. Although now I am thinking all of this
should be unicode characters and have a unique character for each key
stroke (ctrl-V, esc, etc).
> What do you think about having a switch to hand ctrl-V, esc, etc either
> to the script or to the main.c code depending on the user needs ?
OK, that is a little scary. I can see why that is useful, but having a
key to force the details view is a good thing. Also I think it is a good
idea to make any interaction that happens, work with any plugin.
> I could even add some examples from my code,
> like a log viewer that supports scrolling with up/down, things like that.
That sounds like something I wanted to try out. Would love to see your
implementation.
------------------------------
_______________________________________________
plymouth mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/plymouth
End of plymouth Digest, Vol 23, Issue 11
****************************************