forked from izaya/OC-PsychOS2
skip mounting any already mounted filesystems
This commit is contained in:
parent
91d9ce33c8
commit
638322c157
@ -3,6 +3,11 @@ fsmanager.filesystems = {}
|
|||||||
local run = true
|
local run = true
|
||||||
|
|
||||||
function fsmanager.mount(addr)
|
function fsmanager.mount(addr)
|
||||||
|
for k,v in ipairs(fs.mounts()) do
|
||||||
|
if fs.address(v) == addr then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
dest = "/" .. (component.invoke(addr,"getLabel") or "mnt/"..addr:sub(1,3))
|
dest = "/" .. (component.invoke(addr,"getLabel") or "mnt/"..addr:sub(1,3))
|
||||||
syslog("Mounting "..addr.." to "..dest)
|
syslog("Mounting "..addr.." to "..dest)
|
||||||
fs.makeDirectory(dest)
|
fs.makeDirectory(dest)
|
||||||
|
Loading…
Reference in New Issue
Block a user