Compare commits
No commits in common. "fe8107bf7f88658c2c8bff11722fca0be845fada" and "91d9ce33c83c148c871e54967640154481130ea9" have entirely different histories.
fe8107bf7f
...
91d9ce33c8
@ -16,14 +16,6 @@ end
|
||||
function netutil.exportfs(path) -- string -- boolean -- Export the directory *path* over RPC.
|
||||
local path = "/"..table.concat(fs.segments(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
|
||||
rpc.register("fs_"..path.."_"..k,v)
|
||||
print("fs_"..path.."_"..k)
|
||||
|
@ -107,7 +107,6 @@ function fs.mounts() -- -- table -- Returns a table containing the mount points
|
||||
for k,v in pairs(fsmounts) do
|
||||
rt[#rt+1] = k,v.address or "unknown"
|
||||
end
|
||||
table.sort(rt)
|
||||
return rt
|
||||
end
|
||||
|
||||
|
@ -3,11 +3,6 @@ fsmanager.filesystems = {}
|
||||
local run = true
|
||||
|
||||
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))
|
||||
syslog("Mounting "..addr.." to "..dest)
|
||||
fs.makeDirectory(dest)
|
||||
|
Loading…
Reference in New Issue
Block a user