diff --git a/build.cfg b/build.cfg index 630f784..59c4e35 100755 --- a/build.cfg +++ b/build.cfg @@ -11,6 +11,7 @@ modules/drivers/net.lua modules/lib/readline.lua modules/applications/luash.lua modules/applications/genkernel.lua +modules/util/fs-automount.lua modules/setup.lua modules/base/footer.lua diff --git a/modules/util/fs-automount.lua b/modules/util/fs-automount.lua new file mode 100644 index 0000000..6ac387c --- /dev/null +++ b/modules/util/fs-automount.lua @@ -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