[syslinux] Lua.c32 - user input / scripting

e h ehouston3 at yahoo.com
Mon May 9 10:12:51 PDT 2011


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

Thanks,

ehouston3




More information about the Syslinux mailing list