general improvements to ocemu-heartbeat and sinit. for reasons.

This commit is contained in:
Izaya 2017-06-13 14:51:01 +00:00
parent 22f9d7c299
commit 1eadd5ef3c
2 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,8 @@ s("heartbeat",function()
while true do while true do
if _G.DEBUG then if _G.DEBUG then
component.invoke(component.list("ocemu")(),"log","heartbeat:"..tostring(computer.uptime())) component.invoke(component.list("ocemu")(),"log","heartbeat:"..tostring(computer.uptime()))
component.invoke(component.list("ocemu")(),"log",T.unpack(ev))
component.invoke(component.list("ocemu")(),"log","processes:\n"..ps())
end end
C.yield() C.yield()
end end

View File

@ -2,7 +2,7 @@ s("init",function()
local f=fopen("boot:/init.cfg","rb") local f=fopen("boot:/init.cfg","rb")
write("") write("")
if f then if f then
c=freadall(f) local c=freadall(f)
for l in c:gmatch("[^\n]+") do for l in c:gmatch("[^\n]+") do
write("[init] "..l..": ") write("[init] "..l..": ")
local pf=fload(l) local pf=fload(l)