mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2026-01-09 16:02:26 -05:00
services: Add missing returns
This commit is contained in:
parent
1c647c76fe
commit
3ba84ca3b7
@ -15,3 +15,4 @@ function start()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
return {start=start}
|
||||||
@ -21,5 +21,6 @@ function start()
|
|||||||
state = false
|
state = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,"screenblank")
|
end, "screenblank")
|
||||||
end
|
end
|
||||||
|
return {start=start}
|
||||||
@ -16,13 +16,19 @@ end
|
|||||||
for addr in component.list("tape_drive") do
|
for addr in component.list("tape_drive") do
|
||||||
addNode(addr)
|
addNode(addr)
|
||||||
end
|
end
|
||||||
while true do
|
|
||||||
local tE = {coroutine.yield()}
|
function start()
|
||||||
if tE[1] == "component_added" and tE[3] == "tape_drive" then
|
return os.spawn(function()
|
||||||
addNode(tE[2])
|
while true do
|
||||||
elseif tE[1] == "component_removed" and tE[3] == "tape_drive" then
|
local tE = {coroutine.yield()}
|
||||||
if td[tE[2]] then
|
if tE[1] == "component_added" and tE[3] == "tape_drive" then
|
||||||
fs.remove("/dev/tape"..tostring(td[tE[2]]))
|
addNode(tE[2])
|
||||||
|
elseif tE[1] == "component_removed" and tE[3] == "tape_drive" then
|
||||||
|
if td[tE[2]] then
|
||||||
|
fs.remove("/dev/tape"..tostring(td[tE[2]]))
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end, "tape-devfs")
|
||||||
end
|
end
|
||||||
|
return {start=start}
|
||||||
|
|||||||
@ -61,3 +61,4 @@ function start()
|
|||||||
end
|
end
|
||||||
end,"termsrv")
|
end,"termsrv")
|
||||||
end
|
end
|
||||||
|
return {start=start}
|
||||||
|
|||||||
@ -6,13 +6,18 @@ for modem in component.list("modem") do
|
|||||||
component.invoke(modem,"setWakeMessage",message)
|
component.invoke(modem,"setWakeMessage",message)
|
||||||
end
|
end
|
||||||
|
|
||||||
local ltime = computer.uptime()
|
function start()
|
||||||
while true do
|
return os.spawn(function()
|
||||||
if computer.uptime() > ltime+delay then
|
local ltime = computer.uptime()
|
||||||
for modem in component.list("modem") do
|
while true do
|
||||||
component.invoke(modem,"broadcast",port,message)
|
if computer.uptime() > ltime+delay then
|
||||||
|
for modem in component.list("modem") do
|
||||||
|
component.invoke(modem,"broadcast",port,message)
|
||||||
|
end
|
||||||
|
ltime=computer.uptime()
|
||||||
|
end
|
||||||
|
coroutine.yield()
|
||||||
end
|
end
|
||||||
ltime=computer.uptime()
|
end, "WoLBeacon")
|
||||||
end
|
|
||||||
coroutine.yield()
|
|
||||||
end
|
end
|
||||||
|
return {start=start}
|
||||||
Loading…
Reference in New Issue
Block a user