All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] LUA script engine for grub2
Date: Tue, 07 Apr 2009 19:15:44 +0300	[thread overview]
Message-ID: <49DB7C30.8080209@nic.fi> (raw)
In-Reply-To: <ca0f59980904070731q619d324fg5a3b50880fc3734e@mail.gmail.com>

Bean wrote:
> Hi,
> 
> This patch integrate the LUA script engine to grub2. Before applying
> this patch, you should apply the split module patch split_3.diff
> first.
> 
> BTW, I forget to add Makefile.in the previous split_3.diff, so that
> handler.lst will not be generated, I include it in this one.
> 
> To try the LUA engine, you can enter command line, and use:
> 
> parser.lua
> 
> Inside lua, you can use grub.run to execute grub commands, such as:
> 
> grub.run("ls", "-l")
> 
> To switch back to sh, you can run this command:
> 
> grub.run("parser.sh")

I would prefer something like grub.return or grub.exit, or something
like that if really needed.

Here is something that I would like that it can do:

In GUI definition:

action="lua:grub.run(\"ls\", \"-l\")" and action="my_lua_action.lua"

or just

action="lua:my_lua_action.lua"

and

action="ls -l" or action="(ba)sh:ls -l"

This way one could use both grub bash scripting and lua scripting.

Now if something is being executed in my_lua_action.lua and execution
comes to the end it should return to calling code.

grub_lua_execute_file("<file name to lua script>");
grub_lua_execute("<lua commands>");




  parent reply	other threads:[~2009-04-07 16:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07 14:31 [PATCH] LUA script engine for grub2 Bean
2009-04-07 15:18 ` phcoder
2009-04-07 16:15 ` Vesa Jääskeläinen [this message]
2009-04-07 18:27   ` Bean
2009-04-08 14:40     ` Colin D Bennett
2009-04-08 17:02       ` Bean
2009-04-13 14:27 ` Robert Millan
2009-04-14 15:33   ` Yoshinori K. Okuji
2009-04-14 16:18     ` Bean
2009-05-03  8:46       ` Bean
2009-05-16 12:37         ` Bean
2009-05-16 13:31           ` Felix Zielcke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49DB7C30.8080209@nic.fi \
    --to=chaac@nic.fi \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.