mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-23 10:38:05 +11:00
add the -d option to exportfs to allow removing exports
This commit is contained in:
parent
69815096fe
commit
f0527243b4
@ -5,12 +5,13 @@ local rpc = require "rpc"
|
|||||||
|
|
||||||
local tA, tO = shell.parse(...)
|
local tA, tO = shell.parse(...)
|
||||||
if #tA < 1 then
|
if #tA < 1 then
|
||||||
print("Usage: exportfs <directory> [--rw] [--name=<name>]")
|
print("Usage: exportfs <directory> [-d] [--rw] [--name=<name>]")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local px = fsproxy.new(tA[1], not tO.rw)
|
local px = fsproxy.new(tA[1], not tO.rw)
|
||||||
local name = tO.name or tA[1]
|
local name = tO.name or tA[1]
|
||||||
for l,m in pairs(px) do
|
for l,m in pairs(px) do
|
||||||
|
m = not tO.d and m or nil
|
||||||
rpc.register("fs_"..name.."_"..l,m)
|
rpc.register("fs_"..name.."_"..l,m)
|
||||||
end
|
end
|
||||||
print(string.format("%s (%s)", name, (tO.rw and "rw") or "ro"))
|
print(string.format("%s (%s)", name, (tO.rw and "rw") or "ro"))
|
||||||
|
Loading…
Reference in New Issue
Block a user