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>"); _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel