Compare commits

..

No commits in common. "fe8107bf7f88658c2c8bff11722fca0be845fada" and "91d9ce33c83c148c871e54967640154481130ea9" have entirely different histories.

3 changed files with 0 additions and 14 deletions

View File

@ -16,14 +16,6 @@ end
function netutil.exportfs(path) -- string -- boolean -- Export the directory *path* over RPC. function netutil.exportfs(path) -- string -- boolean -- Export the directory *path* over RPC.
local path = "/"..table.concat(fs.segments(path),"/") local path = "/"..table.concat(fs.segments(path),"/")
local px = require("unionfs").create(path) local px = require("unionfs").create(path)
function px.dirstat(p)
local rt = {}
for k,v in ipairs(px.list(p)) do
local fp = p.."/"..v
rt[v] = {px.isDirectory(fp), px.size(fp), px.lastModified(fp)}
end
return rt
end
for k,v in pairs(px) do for k,v in pairs(px) do
rpc.register("fs_"..path.."_"..k,v) rpc.register("fs_"..path.."_"..k,v)
print("fs_"..path.."_"..k) print("fs_"..path.."_"..k)

View File

@ -107,7 +107,6 @@ function fs.mounts() -- -- table -- Returns a table containing the mount points
for k,v in pairs(fsmounts) do for k,v in pairs(fsmounts) do
rt[#rt+1] = k,v.address or "unknown" rt[#rt+1] = k,v.address or "unknown"
end end
table.sort(rt)
return rt return rt
end end

View File

@ -3,11 +3,6 @@ fsmanager.filesystems = {}
local run = true local run = true
function fsmanager.mount(addr) function fsmanager.mount(addr)
for k,v in ipairs(fs.mounts()) do
if fs.address(v) == addr then
return
end
end
dest = "/" .. (component.invoke(addr,"getLabel") or "mnt/"..addr:sub(1,3)) dest = "/" .. (component.invoke(addr,"getLabel") or "mnt/"..addr:sub(1,3))
syslog("Mounting "..addr.." to "..dest) syslog("Mounting "..addr.." to "..dest)
fs.makeDirectory(dest) fs.makeDirectory(dest)