added a boot menu to sebios.lua
This commit is contained in:
parent
d873cc1288
commit
cd1036eeef
15
sebios.lua
15
sebios.lua
@ -72,13 +72,24 @@ do
|
|||||||
wl("Memory: "..tostring(computer.totalMemory()/1024).."K")
|
wl("Memory: "..tostring(computer.totalMemory()/1024).."K")
|
||||||
wl("")
|
wl("")
|
||||||
for k,v in ipairs(bootdevs) do
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
while computer.uptime() < 2 do
|
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
|
end
|
||||||
|
|
||||||
local init, reason
|
local init, reason
|
||||||
|
Loading…
Reference in New Issue
Block a user