1
1
зеркало из https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-09-27 14:45:18 -04:00

made fsmanager work with the new rc system

Этот коммит содержится в:
XeonSquared 2020-03-26 17:35:14 +11:00
родитель dbb7080ca2
Коммит 6c2ef1580b

Просмотреть файл

@ -11,11 +11,16 @@ end
for addr, _ in component.list("filesystem") do
mount(addr)
end
while true do
local tE = {coroutine.yield()}
if tE[1] == "component_added" and tE[3] == "filesystem" then
mount(tE[2])
elseif tE[1] == "component_removed" and tE[3] == "filesystem" then
fs.umount("/mnt/"..tE[2]:sub(1,3))
end
function start()
return os.spawn(function()
while true do
local tE = {coroutine.yield()}
if tE[1] == "component_added" and tE[3] == "filesystem" then
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