diff --git a/sebios.lua b/sebios.lua index 30bf3da..5d0b18b 100644 --- a/sebios.lua +++ b/sebios.lua @@ -72,13 +72,24 @@ do wl("Memory: "..tostring(computer.totalMemory()/1024).."K") wl("") for k,v in ipairs(bootdevs) do - wl(tostring(k).." "..v) + wl(tostring(k-1).." "..v.." "..component.type(v).." "..component.invoke(v,"getLabel")) + end + while computer.uptime() < 5 do + t,_,c = computer.pullSignal(0.5) + if t == "key_down" and c > 47 and c < 58 then + computer.setBootAddress(bootdevs[c-47]) + wl("Boot device set to "..bootdevs[c-47]) + end end end end while computer.uptime() < 2 do - computer.pullSignal(0.5) + t,_,c = computer.pullSignal(0.5) + if t == "key_down" and c > 47 and c < 58 then + computer.setBootAddress(bootdevs[c-47]) + wl("Boot device set to "..bootdevs[c-47]) + end end local init, reason