forked from izaya/OC-PsychOS2
made fsmanager work with the new rc system
This commit is contained in:
parent
dbb7080ca2
commit
6c2ef1580b
@ -11,11 +11,16 @@ end
|
|||||||
for addr, _ in component.list("filesystem") do
|
for addr, _ in component.list("filesystem") do
|
||||||
mount(addr)
|
mount(addr)
|
||||||
end
|
end
|
||||||
while true do
|
|
||||||
local tE = {coroutine.yield()}
|
function start()
|
||||||
if tE[1] == "component_added" and tE[3] == "filesystem" then
|
return os.spawn(function()
|
||||||
mount(tE[2])
|
while true do
|
||||||
elseif tE[1] == "component_removed" and tE[3] == "filesystem" then
|
local tE = {coroutine.yield()}
|
||||||
fs.umount("/mnt/"..tE[2]:sub(1,3))
|
if tE[1] == "component_added" and tE[3] == "filesystem" then
|
||||||
end
|
mount(tE[2])
|
||||||
|
elseif tE[1] == "component_removed" and tE[3] == "filesystem" then
|
||||||
|
fs.umount("/mnt/"..tE[2]:sub(1,3))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,"fsmanager")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user