made fsmanager work with the new rc system

This commit is contained in:
Izaya 2020-03-26 17:35:14 +11:00
parent dbb7080ca2
commit 6c2ef1580b

View File

@ -11,6 +11,9 @@ end
for addr, _ in component.list("filesystem") do for addr, _ in component.list("filesystem") do
mount(addr) mount(addr)
end end
function start()
return os.spawn(function()
while true do while true do
local tE = {coroutine.yield()} local tE = {coroutine.yield()}
if tE[1] == "component_added" and tE[3] == "filesystem" then if tE[1] == "component_added" and tE[3] == "filesystem" then
@ -19,3 +22,5 @@ while true do
fs.umount("/mnt/"..tE[2]:sub(1,3)) fs.umount("/mnt/"..tE[2]:sub(1,3))
end end
end end
end,"fsmanager")
end