From 328c83ce3b74a09a3904352cfec2089b95770bd6 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 25 May 2008 17:41:51 +0000 Subject: [PATCH] * core: Fixed a bug in the dispatcher * core: Move cbi.js to general resource directory * core: Removed Freifunk references * core: Updated Fledermaus theme --- core/root/etc/config/luci | 56 +++++++++++---------- .../luci/media => core/root/www/resources}/cbi.js | 0 core/src/dispatcher.lua | 4 +- core/src/sys.lua | 5 +- core/src/view/cbi/header.htm | 2 +- core/src/view/header.htm | 10 ++-- .../www/luci/{media => fledermaus}/cascade.css | 0 .../root/www/luci/{media => fledermaus}/logo.png | Bin 8 files changed, 42 insertions(+), 35 deletions(-) rename {themes/fledermaus/root/www/luci/media => core/root/www/resources}/cbi.js (100%) rename themes/fledermaus/root/www/luci/{media => fledermaus}/cascade.css (100%) rename themes/fledermaus/root/www/luci/{media => fledermaus}/logo.png (100%) diff --git a/core/root/etc/config/luci b/core/root/etc/config/luci index ded657823..87170a9b1 100644 --- a/core/root/etc/config/luci +++ b/core/root/etc/config/luci @@ -1,35 +1,39 @@ config core main - option lang de - option mediaurlbase /luci/media - option resourcebase /luci/images - option title "Freifunk Kamikaze" - option subtitle Fledermausedition + option lang de + option mediaurlbase /luci/fledermaus + option resourcebase /luci/resources + +config core brand + option title "OpenWRT Kamikaze" + option subtitle Freifunkedition + option firmware "OpenWRT Kamikaze" + option distro "Freifunk Firmware 2.x" config extern flash_keep - option uci "/etc/config" - option dropbear "/etc/dropbear" - option openvpn "/etc/openvpn" - option passwd "/etc/passwd" - option ipkg "/etc/ipkg.conf" - option httpd "/etc/httpd.conf" - option firewall "/etc/firewall.user" + option uci "/etc/config" + option dropbear "/etc/dropbear" + option openvpn "/etc/openvpn" + option passwd "/etc/passwd" + option ipkg "/etc/ipkg.conf" + option httpd "/etc/httpd.conf" + option firewall "/etc/firewall.user" config event uci_oncommit - option network "/etc/init.d/network restart" - option wireless "/etc/init.d/network restart" - option olsr "/sbin/reboot" - option dhcp "/etc/init.d/dnsmasq restart" - option luci_fw "/etc/init.d/luci_fw restart" - option dropbear "/etc/init.d/dropbear restart" - option httpd "/etc/init.d/httpd restart" - option fstab "/etc/init.d/fstab restart" - option qos "/etc/init.d/qos restart" - option luci_splash "/etc/init.d/luci_splash restart" - option freifunk "/etc/init.d/luci_freifunk restart" + option network "/etc/init.d/network restart" + option wireless "/etc/init.d/network restart" + option olsr "/sbin/reboot" + option dhcp "/etc/init.d/dnsmasq restart" + option luci_fw "/etc/init.d/luci_fw restart" + option dropbear "/etc/init.d/dropbear restart" + option httpd "/etc/init.d/httpd restart" + option fstab "/etc/init.d/fstab restart" + option qos "/etc/init.d/qos restart" + option luci_splash "/etc/init.d/luci_splash restart" + option freifunk "/etc/init.d/luci_freifunk restart" config internal languages - option de "Deutsch" - option en "English" + option de "Deutsch" + option en "English" config internal themes - option Fledermaus "/luci/media" + option Fledermaus "/luci/fledermaus" diff --git a/themes/fledermaus/root/www/luci/media/cbi.js b/core/root/www/resources/cbi.js similarity index 100% rename from themes/fledermaus/root/www/luci/media/cbi.js rename to core/root/www/resources/cbi.js diff --git a/core/src/dispatcher.lua b/core/src/dispatcher.lua index daf975e9d..3e8b4d6b6 100644 --- a/core/src/dispatcher.lua +++ b/core/src/dispatcher.lua @@ -128,8 +128,8 @@ function createindex() local suff = ".lua" local controllers = luci.util.combine( - luci.fs.glob(root .. "*" .. suff), - luci.fs.glob(root .. "*/*" .. suff) + luci.fs.glob(root .. "*" .. suff) or {}, + luci.fs.glob(root .. "*/*" .. suff) or {} ) for i,c in ipairs(controllers) do diff --git a/core/src/sys.lua b/core/src/sys.lua index d174c8e74..0399d0e5f 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 diff --git a/core/src/view/cbi/header.htm b/core/src/view/cbi/header.htm index a66d28fee..4229aaf0d 100644 --- a/core/src/view/cbi/header.htm +++ b/core/src/view/cbi/header.htm @@ -1,7 +1,7 @@ <%+header%>
- +
diff --git a/core/src/view/header.htm b/core/src/view/header.htm index 126eb3696..1a09ad304 100644 --- a/core/src/view/header.htm +++ b/core/src/view/header.htm @@ -31,16 +31,16 @@ require("luci.http").prepare_content("text/html") diff --git a/themes/fledermaus/root/www/luci/media/cascade.css b/themes/fledermaus/root/www/luci/fledermaus/cascade.css similarity index 100% rename from themes/fledermaus/root/www/luci/media/cascade.css rename to themes/fledermaus/root/www/luci/fledermaus/cascade.css diff --git a/themes/fledermaus/root/www/luci/media/logo.png b/themes/fledermaus/root/www/luci/fledermaus/logo.png similarity index 100% rename from themes/fledermaus/root/www/luci/media/logo.png rename to themes/fledermaus/root/www/luci/fledermaus/logo.png -- 2.11.0