Added a basic init system.

This commit is contained in:
Izaya 2017-05-15 17:16:20 +10:00
parent b02997bd85
commit 52248755b1
1 changed files with 17 additions and 0 deletions

17
modules/util/sinit.lua Normal file
View File

@ -0,0 +1,17 @@
do
if _OSVERSION and _BD then
print("Starting ".._OSVERSION.." built at ".._BD)
end
local f=fopen("boot:/init.cfg","rb")
if f then
local c=""
local nc=fread(f,2048)
while nc ~= nil and nc ~= "" do
c=c..nc
nc=fread(f,2048)
end
for l in c:gmatch("[^\n]+") do
print("[init] "..l)
end
end
end