update to start working on SysInit

This commit is contained in:
2025-12-10 22:14:52 -05:00
parent 7bc6d87322
commit 6d9d02edf7
163 changed files with 1422 additions and 10637 deletions

View File

@@ -0,0 +1,26 @@
local args = {...}
local kernel = args[1]
local ifs=kernel.ifs
kernel.log("Mounting fstab")
local fstab=ifs.readAllText("/etc/fstab")
local entrys = string.split(fstab,"\n")
for i,v in ipairs(entrys) do
if v:sub(1,1)=="U" then
local id=""
for i=3,#v do
if v:sub(i,i)==";" then
if i==3 then kernel.log("Invalid fstab line... Skipping.","WARN") goto endline end
id=v:sub(3,i-1)
end
end
local path=v:sub(#id+4,#v)
if i~=#entrys then
path=path:sub(1,#path-1)
end
kernel.log("Mounted "..id.." to "..path)
kernel.fs.mount(id,path)
::endline::
end
end
kernel.log("Mounted all disks")