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")
Here is a small lua program to solve the hanoi tower:
function hanoi(n,a,b,c)
if (n == 1) then
print ("move from", a, "to", c)
else
hanoi (n-1, a, c, b)
hanoi (1, a, b, c)
hanoi (n-1, b, a, c)
end
end
hanoi (3, 1, 2, 3)
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/grub-devel