소스 검색

made fsmanager work with the new rc system

pull/1/head
XeonSquared 4 년 전
부모
커밋
6c2ef1580b
1개의 변경된 파일12개의 추가작업 그리고 7개의 파일을 삭제
  1. +12
    -7
      service/fsmanager.lua

+ 12
- 7
service/fsmanager.lua 파일 보기

@@ -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

불러오는 중...
취소
저장