From f0527243b4ebf3577b80df2b8ff6f63a022425ac Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sat, 17 Oct 2020 10:45:36 +1100 Subject: [PATCH] add the -d option to exportfs to allow removing exports --- MTFS/OpenOS/usr/bin/exportfs.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MTFS/OpenOS/usr/bin/exportfs.lua b/MTFS/OpenOS/usr/bin/exportfs.lua index 99ff63b..106dc26 100644 --- a/MTFS/OpenOS/usr/bin/exportfs.lua +++ b/MTFS/OpenOS/usr/bin/exportfs.lua @@ -5,12 +5,13 @@ local rpc = require "rpc" local tA, tO = shell.parse(...) if #tA < 1 then - print("Usage: exportfs [--rw] [--name=]") + print("Usage: exportfs [-d] [--rw] [--name=]") return end local px = fsproxy.new(tA[1], not tO.rw) local name = tO.name or tA[1] for l,m in pairs(px) do + m = not tO.d and m or nil rpc.register("fs_"..name.."_"..l,m) end print(string.format("%s (%s)", name, (tO.rw and "rw") or "ro"))