summaryrefslogtreecommitdiffhomepage
path: root/core/src/sys.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-25 17:41:51 +0000
committerSteven Barth <steven@midlink.org>2008-05-25 17:41:51 +0000
commit328c83ce3b74a09a3904352cfec2089b95770bd6 (patch)
treeb589344c8bfd2eaa94f53ea287008a827734ec09 /core/src/sys.lua
parent365d80765d3f08c457b0a373c395c8e1940e44be (diff)
* core: Fixed a bug in the dispatcher
* core: Move cbi.js to general resource directory * core: Removed Freifunk references * core: Updated Fledermaus theme
Diffstat (limited to 'core/src/sys.lua')
-rw-r--r--core/src/sys.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/sys.lua b/core/src/sys.lua
index d174c8e741..0399d0e5f0 100644
--- a/core/src/sys.lua
+++ b/core/src/sys.lua
@@ -28,12 +28,15 @@ module("luci.sys", package.seeall)
require("posix")
require("luci.bits")
require("luci.util")
+require("luci.fs")
-- Returns whether a system is bigendian
function bigendian()
local fp = io.open("/bin/sh")
fp:seek("set", 5)
- return (fp:read(1):byte() ~= 1)
+ local be = (fp:read(1):byte() ~= 1)
+ fp:close()
+ return be
end
-- Runs "command" and returns its output