diff --git a/modules/util/fs-automount.lua b/modules/util/fs-automount.lua index 289ea9f..19df408 100644 --- a/modules/util/fs-automount.lua +++ b/modules/util/fs-automount.lua @@ -1,5 +1,4 @@ do - local C=0 for c in component.list("filesystem") do if c == computer.tmpAddress() then fs.mount("tmp",component.proxy(c)) @@ -13,31 +12,11 @@ do fs.mount(component.invoke(c,"getLabel"),component.proxy(c)) log(c:sub(1,8).." mounted as "..component.invoke(c,"getLabel")) end - fs.mount("fs"..string.format("%02d",C),component.proxy(c)) - log(c:sub(1,8).." mounted as fs"..string.format("%02d",C)) - C=C+1 + fs.mount(c:sub(1,3),component.proxy(c)) + log(c:sub(1,8).." mounted as "..c:sub(1,3)) end if component.type(computer.getBootAddress()) ~= "filesystem" then fs.mount("boot",component.proxy(computer.tmpAddress())) log(computer.tmpAddress():sub(1,8).." mounted as boot") end - if component.type(computer.getBootAddress()) == "tape_drive" then - if tape then - tape.rewind() - local pt = tape.records() - for k,v in ipairs(pt) do - if v[1] == "D" then - print(tostring(k).."\t"..v[1].."\t/boot/"..tape.rrecord(k)) - fs.mkdir("/boot/"..tape.rrecord(k)) - elseif v[1] == "f" then - local fn,fc = tape.parsefile(tape.rrecord(k)) - print(tostring(k).."\t"..v[1].."\t/boot/"..fn) - local f=io.open("/boot/"..fn,"wb") - f:write(fc) - f:close() - end - computer.beep() - end - end - end end