[syslinux] Lua.c32 - user input / scripting

H. Peter Anvin hpa at zytor.com
Mon May 9 11:41:37 PDT 2011


On 05/09/2011 10:12 AM, e h wrote:
> I'm trying to get this bit of code to work with the lua.c32 interpreter:
> 
> --- sample, the goal is to build a script that will allow me to enter a 4digit 
> mt and load the bios iso accordingly
> 
> print ("enter machine type :")
> mt = io.read()
> print ("you entered...",mt)
> doStuff()
> 
> if (mt == "8141") then
>   syslinux.run_command("memdisk initrd=/dos/BIOS/FSC-P7935-108.img raw")
> end
> 
> --- the problem is that lua kicks out an error every time "...attempt to call 
> field 'read' ( a nil value)"
> --- this seems to work on the interpreter i installed on my linux box, but when 
> i use it as a com32 it fails.
> --- boot: Lua.c32 /test/test.lua ---> runs lua script but fails on io.read()
> 
> any help appreciated
> 

Hmm... I wonder if we simply fail to hook up the console APIs, or if we
totally failed to bind io.read() at all; which seems odd...

	-hpa




More information about the Syslinux mailing list