diff --git a/configs/everything-noinit.cfg b/configs/everything-noinit.cfg index fc81ac6..c018120 100644 --- a/configs/everything-noinit.cfg +++ b/configs/everything-noinit.cfg @@ -1,3 +1,4 @@ +base/loadlin.lua base/header.lua library/print.lua library/fs-min.lua diff --git a/configs/everything.cfg b/configs/everything.cfg index fc057cb..7df1420 100644 --- a/configs/everything.cfg +++ b/configs/everything.cfg @@ -1,3 +1,4 @@ +base/loadlin.lua base/header.lua library/print.lua library/fs-min.lua diff --git a/modules/base/loadlin.lua b/modules/base/loadlin.lua new file mode 100644 index 0000000..9e37a15 --- /dev/null +++ b/modules/base/loadlin.lua @@ -0,0 +1,10 @@ +if pcall(require,"computer") then + print("OpenOS detected.") + print("Please note that if you didn't call this with its full name, this will not work.") + print("eg: kernel.lua rather than just kernel") + local computer = require "computer" + local process = require "process" + os.execute("cp "..process.info().path.." /tmp/init.lua") + computer.setBootAddress(computer.tmpAddress()) + computer.shutdown(true) +end