1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-18 18:25:06 -05:00
OC-PsychOS2/module/init.lua

21 lines
561 B
Lua
Raw Normal View History

2018-11-02 12:05:41 -04:00
os.spawn(function() print(pcall(function()
print(_OSVERSION,tostring(math.floor(computer.totalMemory()/1024)).."K memory")
2019-01-08 01:59:01 -05:00
os.setenv("PWD","/boot")
2018-11-02 12:05:41 -04:00
local f = fs.open("/boot/init.txt","rb")
2019-01-08 01:59:01 -05:00
if f then
local fc = f:read("*a")
f:close()
for line in fc:gmatch("[^\n]+") do
print("Starting service "..line)
spawnfile("/boot/service/"..line,line)
end
2018-11-02 12:05:41 -04:00
end
for k,v in pairs(fd) do
if v.t == "t" then
2019-01-08 01:59:01 -05:00
os.setenv("t",k)
2018-11-02 12:05:41 -04:00
print("Spawning a shell for terminal #"..tostring(k))
spawnfile("/boot/exec/shell.lua","shell #"..tostring(k))
end
end
end)) end,"init")