added an automounting program that runs at boot.

This commit is contained in:
Izaya 2017-08-01 15:45:57 +10:00
parent 2aa6976c32
commit ed2503e9a2
2 changed files with 17 additions and 0 deletions

View File

@ -11,6 +11,7 @@ modules/drivers/net.lua
modules/lib/readline.lua modules/lib/readline.lua
modules/applications/luash.lua modules/applications/luash.lua
modules/applications/genkernel.lua modules/applications/genkernel.lua
modules/util/fs-automount.lua
modules/setup.lua modules/setup.lua
modules/base/footer.lua modules/base/footer.lua

View File

@ -0,0 +1,16 @@
do
local C=0
for c in component.list("filesystem") do
if c == computer.tmpAddress() then
fs.mount("tmp",component.proxy(c))
print(c:sub(1,8).." mounted as tmp")
end
if c == computer.getBootAddress() then
fs.mount("boot",component.proxy(c))
print(c:sub(1,8).." mounted as boot")
end
fs.mount("fs"..string.format("%02d",C),component.proxy(c))
print(c:sub(1,8).." mounted as fs"..string.format("%02d",C))
C=C+1
end
end