Added a basic init system.
This commit is contained in:
parent
b02997bd85
commit
52248755b1
17
modules/util/sinit.lua
Normal file
17
modules/util/sinit.lua
Normal 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
|
Loading…
Reference in New Issue
Block a user