Add monolith detection

This commit is contained in:
Ocawesome101 2020-06-18 17:02:05 -04:00 committed by GitHub
parent 722606b419
commit 813bf47319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
local cfgadd = ...
local component = require("component")
for fs in component.list("filesystem") do
if (component.invoke(fs, "getLabel") == "Monolith" or component.invoke(fs, "exists", "/boot/monolith")) and component.invoke(fs, "exists", "init.lua") then
print("Monolith discovered on " .. fs)
cfgadd(string.format([[
menu.add("Monolith on %s", function()
return loadmod("loader_monolith")("%s")
end)
]], fs:sub(1,3), fs))
end
end