From cfe3e78d642b0d95863357bbc42352a59c2a46cd Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 26 Mar 2020 17:37:14 +1100 Subject: [PATCH] importfs and exportfs improvements --- lib/netutil.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/netutil.lua b/lib/netutil.lua index 5f1585f..b572255 100644 --- a/lib/netutil.lua +++ b/lib/netutil.lua @@ -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