services: Add missing returns
This commit is contained in:
@@ -15,3 +15,4 @@ function start()
|
||||
end
|
||||
end)
|
||||
end
|
||||
return {start=start}
|
||||
@@ -21,5 +21,6 @@ function start()
|
||||
state = false
|
||||
end
|
||||
end
|
||||
end,"screenblank")
|
||||
end, "screenblank")
|
||||
end
|
||||
return {start=start}
|
||||
+14
-8
@@ -16,13 +16,19 @@ end
|
||||
for addr in component.list("tape_drive") do
|
||||
addNode(addr)
|
||||
end
|
||||
while true do
|
||||
local tE = {coroutine.yield()}
|
||||
if tE[1] == "component_added" and tE[3] == "tape_drive" then
|
||||
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]]))
|
||||
|
||||
function start()
|
||||
return os.spawn(function()
|
||||
while true do
|
||||
local tE = {coroutine.yield()}
|
||||
if tE[1] == "component_added" and tE[3] == "tape_drive" then
|
||||
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, "tape-devfs")
|
||||
end
|
||||
return {start=start}
|
||||
|
||||
@@ -61,3 +61,4 @@ function start()
|
||||
end
|
||||
end,"termsrv")
|
||||
end
|
||||
return {start=start}
|
||||
|
||||
+13
-8
@@ -6,13 +6,18 @@ for modem in component.list("modem") do
|
||||
component.invoke(modem,"setWakeMessage",message)
|
||||
end
|
||||
|
||||
local ltime = computer.uptime()
|
||||
while true do
|
||||
if computer.uptime() > ltime+delay then
|
||||
for modem in component.list("modem") do
|
||||
component.invoke(modem,"broadcast",port,message)
|
||||
function start()
|
||||
return os.spawn(function()
|
||||
local ltime = computer.uptime()
|
||||
while true do
|
||||
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
|
||||
ltime=computer.uptime()
|
||||
end
|
||||
coroutine.yield()
|
||||
end, "WoLBeacon")
|
||||
end
|
||||
return {start=start}
|
||||
Reference in New Issue
Block a user