OC-Tsuki/extras/velxboot/init.lua

22 lines
499 B
Lua
Raw Normal View History

2020-05-24 15:15:10 +10:00
local function boot_velx(addr, path)
2020-05-24 15:06:37 +10:00
2020-05-24 15:15:10 +10:00
end
local eeprom = component.proxy(component.list("eeprom")())
local config = eeprom.getData()
local addr, path = config:match("^(.+);(.+)$")
if not addr then
addr = config
path = "boot.velx"
else
return boot_velx(addr, path)
end
if not component.invoke(addr, "exists", path) then
for d in component.list("filesystem") do
if (component.invoke(d, "exists", "boot.velx")) then
eeprom.setData(d..";boot.velx")
boot_velx(d, "boot.velx")
end
end
2020-05-24 15:06:37 +10:00
end