summaryrefslogtreecommitdiffhomepage
path: root/build/setup.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-08 16:52:51 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-08 16:52:51 +0100
commitb348413fb23962e28fd5158e3ba21ea933feb8f3 (patch)
treeb375b105f48d24476ea765667a412bee6d4f34f6 /build/setup.lua
parenteb25d532a88b140431c20077edf56bb40663c8fc (diff)
build: remove remainders of old build system
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'build/setup.lua')
-rw-r--r--build/setup.lua46
1 files changed, 0 insertions, 46 deletions
diff --git a/build/setup.lua b/build/setup.lua
deleted file mode 100644
index f4ed76954..000000000
--- a/build/setup.lua
+++ /dev/null
@@ -1,46 +0,0 @@
-local SYSROOT = os.getenv("LUCI_SYSROOT")
-
--- override uci access
-local uci_core = require "uci"
-local uci_model = require "luci.model.uci"
-
-uci_model.cursor = function(config, save)
- return uci_core.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci")
-end
-
-uci_model.cursor_state = function()
- return uci_core.cursor(SYSROOT .. "/etc/config", SYSROOT .. "/var/state")
-end
-
-uci_model.inst = uci_model.cursor()
-uci_model.inst_state = uci_model.cursor_state()
-
--- allow any password in local sdk
-local sys = require "luci.sys"
-sys.user.checkpasswd = function() return true end
-sys.user.getpasswd = function() return "x" end
-
--- dummy sysinfo on Darwin
-require "nixio"
-
-if not nixio.sysinfo then
- function nixio.sysinfo()
- return {
- bufferram = 0,
- freehigh = 0,
- freeram = 0,
- freeswap = 0,
- loads = { 0.0, 0.0, 0.0 },
- mem_unit = 1024,
- procs = 0,
- sharedram = 0,
- totalhigh = 0
- }
- end
-end
-
--- override nixio.fs.access() to check sysroot first
-local _access = nixio.fs.access
-function nixio.fs.access(file)
- return _access(SYSROOT .. "/" .. file) or _access(file)
-end