made unified colors and stuff

This commit is contained in:
2026-03-19 08:33:47 -04:00
parent 4f9eebade2
commit 9b338328f0
40 changed files with 1218 additions and 1145 deletions

View File

@@ -1,15 +1,16 @@
--:Minify:--
local kernel=...
local fs=require("fs")
kernel.log("Sysinit started...")
for i,v in pairs(kernel.processes) do
kernel.log("Spawning kernel task "..i)
syscall.spawn(function()
local status, err = pcall(v)
if not status then
kernel.log("Error executing kernel task '" .. i .. "': " .. err, "ERROR")
kernel.log("Error executing kernel task '" .. i .. "': " .. err, "ERROR", 0xFF0000)
else
kernel.log("Successfully executed kernel task: " .. i, "INFO")
kernel.log("Successfully executed kernel task: " .. i)
end
end, i)
end
@@ -17,23 +18,24 @@ end
if not fs.exists("/bin/startup") then
fs.mkdir("/bin/startup")
end
local files = fs.list("/bin/startup")
if not files then error("Failed to list /bin/startup") end
for i,v in ipairs(files) do
if v:sub(-4) == ".lua" then
local filepath = "/bin/startup/" .. v
kernel.log("Executing startup script: " .. filepath, "INFO")
kernel.log("Executing startup script: " .. filepath)
local startupFunc, err = load(fs.readAllText(filepath), "@" .. filepath)
if not startupFunc then
kernel.log("Error loading startup script '" .. filepath .. "': " .. err, "ERROR")
kernel.log("Error loading startup script '" .. filepath .. "': " .. err, "ERROR", 0xFF0000)
else
syscall.spawn(function()
syscall.setuid(1)
local status, err = pcall(startupFunc)
if not status then
kernel.log("Error executing startup script '" .. filepath .. "': " .. err, "ERROR")
kernel.log("Error executing startup script '" .. filepath .. "': " .. err, "ERROR", 0xFF0000)
else
kernel.log("Successfully executed startup script: " .. filepath, "INFO")
kernel.log("Successfully executed startup script: " .. filepath)
end
end, "startup:" .. v)
end