From 8b2d6778dc2332a1cd5180213ec83dce08f28254 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sun, 28 May 2017 17:29:23 +0000 Subject: [PATCH] better detection for the path --- modules/base/loadlin.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/base/loadlin.lua b/modules/base/loadlin.lua index 9e37a15..cdd7938 100644 --- a/modules/base/loadlin.lua +++ b/modules/base/loadlin.lua @@ -1,10 +1,9 @@ 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") + print(os.getenv("_")) local computer = require "computer" local process = require "process" - os.execute("cp "..process.info().path.." /tmp/init.lua") + os.execute("cp "..os.getenv("_").." /tmp/init.lua") computer.setBootAddress(computer.tmpAddress()) computer.shutdown(true) end