From 813bf473193ba1466fd4ffcd7838dc150bf5ec3b Mon Sep 17 00:00:00 2001 From: Ocawesome101 <50844998+Ocawesome101@users.noreply.github.com> Date: Thu, 18 Jun 2020 17:02:05 -0400 Subject: [PATCH] Add monolith detection --- util/OpenOS/config.d/05_monolith.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 util/OpenOS/config.d/05_monolith.lua diff --git a/util/OpenOS/config.d/05_monolith.lua b/util/OpenOS/config.d/05_monolith.lua new file mode 100644 index 0000000..aec12b2 --- /dev/null +++ b/util/OpenOS/config.d/05_monolith.lua @@ -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