From cff032643e8478fb1b606898e524549108615fca Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sun, 28 May 2017 11:58:53 +0000 Subject: [PATCH] added a module added before the other base stuff to load MultICE from OpenOS --- configs/everything-noinit.cfg | 1 + configs/everything.cfg | 1 + modules/base/loadlin.lua | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 modules/base/loadlin.lua 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