summaryrefslogtreecommitdiffhomepage
path: root/build
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-12-29 18:09:17 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-12-29 18:09:17 +0000
commit7d0134fedc14794d68c9e9fe9dba60744d8ed8af (patch)
tree7bca091f949bff6a8d00ee7377cd59a952cb8b2d /build
parent859f99845ebd1653048e69c02c8e392e7bf096f4 (diff)
build: emulate nixio.sysinfo() on Darwin
Diffstat (limited to 'build')
-rw-r--r--build/setup.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/build/setup.lua b/build/setup.lua
index f374da90f..d8fd5ddb9 100644
--- a/build/setup.lua
+++ b/build/setup.lua
@@ -26,3 +26,22 @@ end
-- allow any password in local sdk
local sys = require "luci.sys"
sys.user.checkpasswd = function() return true 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