|
|
@@ -1,6 +1,7 @@ |
|
|
|
local computer = require "computer" |
|
|
|
local minitel = require "minitel" |
|
|
|
local event = require "event" |
|
|
|
local ufs = require "unionfs" |
|
|
|
local rpc = require "rpc" |
|
|
|
local netutil = {} |
|
|
|
|
|
|
@@ -9,6 +10,7 @@ function netutil.importfs(host,rpath,lpath) -- import filesystem *rpath* from *h |
|
|
|
function px.getLabel() |
|
|
|
return host..":"..rpath |
|
|
|
end |
|
|
|
px.address = host..":"..rpath |
|
|
|
return fs.mount(lpath,px) |
|
|
|
end |
|
|
|
|
|
|
@@ -16,7 +18,7 @@ function netutil.exportfs(path) -- export the directory *path* over RPC |
|
|
|
local path = "/"..table.concat(fs.segments(path),"/") |
|
|
|
local px = ufs.create(path) |
|
|
|
for k,v in pairs(px) do |
|
|
|
rpcs.register(path.."_"..k,v) |
|
|
|
rpc.register(path.."_"..k,v) |
|
|
|
print(path.."_"..k) |
|
|
|
end |
|
|
|
return true |
|
|
|