1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-15 07:47:40 +00:00

better startup

This commit is contained in:
kepler155c@gmail.com
2017-09-25 17:00:02 -04:00
parent 3c2892074a
commit f325550de2
5 changed files with 64 additions and 38 deletions

View File

@@ -284,6 +284,23 @@ function fs.mount(path, fstype, ...)
return node
end
function fs.loadTab(path)
local mounts = Util.readFile(path)
if mounts then
for _,l in ipairs(Util.split(mounts)) do
if l:sub(1, 1) ~= '#' then
local s, m = pcall(function()
fs.mount(table.unpack(Util.matches(l)))
end)
if not s then
printError('Mount failed')
printError(l)
end
end
end
end
end
local function getNodeByParts(parts)
local node = fs.nodes