projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
859f998
)
build: emulate nixio.sysinfo() on Darwin
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 29 Dec 2009 18:09:17 +0000
(18:09 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 29 Dec 2009 18:09:17 +0000
(18:09 +0000)
build/setup.lua
patch
|
blob
|
history
diff --git
a/build/setup.lua
b/build/setup.lua
index f374da90f7967c4e9fce752ac4111062ccda798c..d8fd5ddb9790ddeb6780936ee8a59257594e278a 100644
(file)
--- 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