Renamed FFLuCI to LuCI, ffluci to luci and Freifunk Lua Configuration Interface to...
authorSteven Barth <steven@midlink.org>
Sun, 25 May 2008 17:00:30 +0000 (17:00 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 25 May 2008 17:00:30 +0000 (17:00 +0000)
98 files changed:
.project
INSTALL
Makefile
NOTICE
applications/community-halle/root/etc/uci-defaults/ffluci-community-halle [deleted file]
applications/community-halle/root/etc/uci-defaults/luci-community-halle [new file with mode: 0644]
applications/community-hannover/root/etc/uci-defaults/ffluci-community-hannover [deleted file]
applications/community-hannover/root/etc/uci-defaults/luci-community-hannover [new file with mode: 0644]
applications/community-leipzig/root/etc/uci-defaults/ffluci-community-leipzig [deleted file]
applications/community-leipzig/root/etc/uci-defaults/luci-community-leipzig [new file with mode: 0644]
applications/luci-ffwizard-leipzig/src/controller/luci_ffwizard_leipzig/wizard.lua
applications/luci-ffwizard-leipzig/src/view/freifunk/wizard.htm
applications/luci-fw/src/controller/luci_fw/luci_fw.lua
applications/luci-fw/src/model/cbi/luci_fw/firewall.lua
applications/luci-fw/src/model/cbi/luci_fw/portfw.lua
applications/luci-fw/src/model/cbi/luci_fw/routing.lua
applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi
applications/luci-splash/root/usr/lib/luci-splash/htdocs/index.html
applications/luci-splash/root/usr/sbin/luci-splash
applications/luci-splash/root/www/cgi-bin/luci-splash
applications/luci-splash/src/controller/splash/splash.lua
applications/luci-splash/src/model/cbi/splash/splash.lua
applications/sgi-haserl/root/www/cgi-bin/ffluci [deleted file]
applications/sgi-haserl/root/www/cgi-bin/ffluci-upload [deleted file]
applications/sgi-haserl/root/www/cgi-bin/index.cgi
applications/sgi-haserl/root/www/cgi-bin/luci [new file with mode: 0755]
applications/sgi-haserl/root/www/cgi-bin/luci-upload [new file with mode: 0755]
applications/sgi-haserl/root/www/index.html
applications/sgi-haserl/src/sgi/haserl.lua
applications/sgi-webuci/root/lib/webuci/main.lua
applications/sgi-webuci/src/sgi/webuci.lua
build/config.mk
contrib/package/ffluci/Makefile [deleted file]
contrib/package/ffluci/ipkg/ffluci-ff-hannover.postinst [deleted file]
contrib/package/ffluci/ipkg/ffluci-ff-leipzig.postinst [deleted file]
contrib/package/ffluci/ipkg/ffluci-sgi-haserl.postinst [deleted file]
contrib/package/haserl-lua/Makefile
contrib/package/luci-addons/Makefile
contrib/package/luci-addons/dist/sbin/ffluci-flash [deleted file]
contrib/package/luci-addons/dist/sbin/luci-flash [new file with mode: 0644]
contrib/package/luci/Makefile [new file with mode: 0644]
contrib/package/luci/ipkg/luci-ff-hannover.postinst [new file with mode: 0644]
contrib/package/luci/ipkg/luci-ff-leipzig.postinst [new file with mode: 0755]
contrib/package/luci/ipkg/luci-sgi-haserl.postinst [new file with mode: 0755]
core/root/etc/config/luci
core/src/bits.lua
core/src/cbi.lua
core/src/config.lua
core/src/debug.lua
core/src/dispatcher.lua
core/src/fs.lua
core/src/http.lua
core/src/i18n.lua
core/src/init.lua
core/src/menu.lua
core/src/model/ipkg.lua
core/src/model/uci.lua
core/src/model/uci/libuci.lua
core/src/model/uci/wrapper.lua
core/src/sys.lua
core/src/sys/iptparser.lua
core/src/template.lua
core/src/util.lua
core/src/view/cbi/header.htm
core/src/view/cbi/mvalue.htm
core/src/view/error404.htm
core/src/view/footer.htm
core/src/view/header.htm
modules/admin-core/src/controller/admin/index.lua
modules/admin-core/src/controller/admin/network.lua
modules/admin-core/src/controller/admin/services.lua
modules/admin-core/src/controller/admin/status.lua
modules/admin-core/src/controller/admin/system.lua
modules/admin-core/src/controller/admin/uci.lua
modules/admin-core/src/controller/admin/wifi.lua
modules/admin-core/src/i18n/admin_index.en
modules/admin-core/src/model/cbi/admin_index/luci.lua
modules/admin-core/src/model/cbi/admin_network/dhcp.lua
modules/admin-core/src/model/cbi/admin_network/routes.lua
modules/admin-core/src/model/cbi/admin_services/olsrd.lua
modules/admin-core/src/model/cbi/admin_wifi/devices.lua
modules/admin-core/src/model/cbi/admin_wifi/networks.lua
modules/admin-core/src/view/admin_index/index.htm
modules/admin-core/src/view/admin_uci/changes.htm
modules/freifunk/src/controller/freifunk/freifunk.lua
modules/freifunk/src/controller/freifunk/luciinfo.lua
modules/freifunk/src/controller/freifunk/olsr.lua
modules/freifunk/src/view/freifunk/contact.htm
modules/freifunk/src/view/freifunk/index.htm
modules/freifunk/src/view/public_status/index.htm
modules/freifunk/src/view/public_status/iwscan.htm
modules/freifunk/src/view/public_status/routes.htm
themes/fledermaus/root/www/ffluci/media/cascade.css [deleted file]
themes/fledermaus/root/www/ffluci/media/cbi.js [deleted file]
themes/fledermaus/root/www/ffluci/media/logo.png [deleted file]
themes/fledermaus/root/www/luci/media/cascade.css [new file with mode: 0644]
themes/fledermaus/root/www/luci/media/cbi.js [new file with mode: 0644]
themes/fledermaus/root/www/luci/media/logo.png [new file with mode: 0644]

index 1b9dc67..4c60d6e 100644 (file)
--- a/.project
+++ b/.project
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-       <name>ffluci</name>
+       <name>luci</name>
        <comment></comment>
        <projects>
        </projects>
diff --git a/INSTALL b/INSTALL
index 7d10d79..faac714 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,4 @@
-FFLuCI Installation Instructions
+LuCI Installation Instructions
 
 TOC:
 1. Kamikaze Feed
@@ -9,13 +9,13 @@ TOC:
        1. Change to your OpenWRT buildroot
 
        2. Add the following line to your OpenWRT feeds.conf:
-               src-svn ffluci https://dev.leipzig.freifunk.net/svn/ff-luci/trunk/contrib/package
+               src-svn luci https://dev.leipzig.freifunk.net/svn/ff-luci/trunk/contrib/package
                
        3. Run ./scripts/feeds update
        
-       4. Run ./scripts/feeds install -a -p ffluci
+       4. Run ./scripts/feeds install -a -p luci
        
-       5. Type make menuconfig and you will find ffluci in the menu "Administration"
+       5. Type make menuconfig and you will find luci in the menu "Administration"
        
                
 2. Kamikaze Packages
@@ -24,4 +24,4 @@ TOC:
        3.      Type: ln -s /path/to/ff-luci/contrib/package/* ./
        
        4.      cd to your kamikaze build root and type: make menuconfig
-               You will find ffluci in the menu "Administration"
\ No newline at end of file
+               You will find luci in the menu "Administration"
\ No newline at end of file
index 8d4c73b..32ef02d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ clean:
        for i in $(MODULES); do make -C$$i clean; done
 
 host: build
-       mkdir -p host/ffluci
+       mkdir -p host/luci
        for i in $(MODULES); do cp $$i/dist$(LUCI_INSTALLDIR) host/ -R 2>/dev/null || true; done
        
 hostclean: clean
diff --git a/NOTICE b/NOTICE
index afb2128..b9784e4 100644 (file)
--- a/NOTICE
+++ b/NOTICE
@@ -1,7 +1,7 @@
-FFLuCI - Freifunk Lua Configuration Interface
+LuCI - Lua Configuration Interface
 Copyright 2008 Steven Barth <steven@midlink.org>
 Licensed under the Apache License, Version 2.0.
 
-Luci-Statistics - Statistics for FFLuCI
+Luci-Statistics - Statistics for LuCI
 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
 Licensed under the Apache License, Version 2.0.
diff --git a/applications/community-halle/root/etc/uci-defaults/ffluci-community-halle b/applications/community-halle/root/etc/uci-defaults/ffluci-community-halle
deleted file mode 100644 (file)
index 8e4286a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-uci batch <<-EOF
-        set freifunk.community.name='Freifunk Halle'
-        set freifunk.community.homepage=http://halle.freifunk.net
-        set freifunk.community.essid=halle.freifunk.net
-        set freifunk.community.bssid=02:CA:FF:EE:BA:BE
-        set freifunk.community.realm=pool.freifunk-halle.net
-        set freifunk.community.channel=1
-        set freifunk.community.net=104.0.0.0
-        set freifunk.community.mask=255.0.0.0
-        set freifunk.community.dhcp=10.0.0.0
-        set freifunk.community.dhcpmask=255.255.255.0
-        set freifunk.community.dns='88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222'
-        commit freifunk
-EOF
-       
diff --git a/applications/community-halle/root/etc/uci-defaults/luci-community-halle b/applications/community-halle/root/etc/uci-defaults/luci-community-halle
new file mode 100644 (file)
index 0000000..8e4286a
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+uci batch <<-EOF
+        set freifunk.community.name='Freifunk Halle'
+        set freifunk.community.homepage=http://halle.freifunk.net
+        set freifunk.community.essid=halle.freifunk.net
+        set freifunk.community.bssid=02:CA:FF:EE:BA:BE
+        set freifunk.community.realm=pool.freifunk-halle.net
+        set freifunk.community.channel=1
+        set freifunk.community.net=104.0.0.0
+        set freifunk.community.mask=255.0.0.0
+        set freifunk.community.dhcp=10.0.0.0
+        set freifunk.community.dhcpmask=255.255.255.0
+        set freifunk.community.dns='88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222'
+        commit freifunk
+EOF
+       
diff --git a/applications/community-hannover/root/etc/uci-defaults/ffluci-community-hannover b/applications/community-hannover/root/etc/uci-defaults/ffluci-community-hannover
deleted file mode 100644 (file)
index 97b7cef..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-uci batch <<-EOF
-        set freifunk.community.name='Freifunk Hannover'
-        set freifunk.community.homepage=http://www.freifunk-hannover.de
-        set freifunk.community.essid=hannover.freifunk.net
-        set freifunk.community.bssid=CA:FF:EE:CA:FF:EE
-        set freifunk.community.realm=db.freifunk-hannover.de
-        set freifunk.community.channel=1
-        set freifunk.community.net=10.2.0.0
-        set freifunk.community.mask=255.255.0.0
-        commit freifunk
-EOF
-       
diff --git a/applications/community-hannover/root/etc/uci-defaults/luci-community-hannover b/applications/community-hannover/root/etc/uci-defaults/luci-community-hannover
new file mode 100644 (file)
index 0000000..97b7cef
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+uci batch <<-EOF
+        set freifunk.community.name='Freifunk Hannover'
+        set freifunk.community.homepage=http://www.freifunk-hannover.de
+        set freifunk.community.essid=hannover.freifunk.net
+        set freifunk.community.bssid=CA:FF:EE:CA:FF:EE
+        set freifunk.community.realm=db.freifunk-hannover.de
+        set freifunk.community.channel=1
+        set freifunk.community.net=10.2.0.0
+        set freifunk.community.mask=255.255.0.0
+        commit freifunk
+EOF
+       
diff --git a/applications/community-leipzig/root/etc/uci-defaults/ffluci-community-leipzig b/applications/community-leipzig/root/etc/uci-defaults/ffluci-community-leipzig
deleted file mode 100644 (file)
index 3ba84d0..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-uci batch <<-EOF
-        set freifunk.community.name='Freifunk Leipzig'
-        set freifunk.community.homepage=http://leipzig.freifunk.net
-        set freifunk.community.essid=leipzig.freifunk.net
-        set freifunk.community.bssid=02:CA:FF:EE:BA:BE
-        set freifunk.community.realm=db.leipzig.freifunk.net
-        set freifunk.community.channel=1
-        set freifunk.community.net=104.0.0.0
-        set freifunk.community.mask=255.0.0.0
-        set freifunk.community.dhcp=10.0.0.0
-        set freifunk.community.dhcpmask=255.255.255.0
-        set freifunk.community.dns='88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222'
-        commit freifunk
-EOF
-       
\ No newline at end of file
diff --git a/applications/community-leipzig/root/etc/uci-defaults/luci-community-leipzig b/applications/community-leipzig/root/etc/uci-defaults/luci-community-leipzig
new file mode 100644 (file)
index 0000000..3ba84d0
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+uci batch <<-EOF
+        set freifunk.community.name='Freifunk Leipzig'
+        set freifunk.community.homepage=http://leipzig.freifunk.net
+        set freifunk.community.essid=leipzig.freifunk.net
+        set freifunk.community.bssid=02:CA:FF:EE:BA:BE
+        set freifunk.community.realm=db.leipzig.freifunk.net
+        set freifunk.community.channel=1
+        set freifunk.community.net=104.0.0.0
+        set freifunk.community.mask=255.0.0.0
+        set freifunk.community.dhcp=10.0.0.0
+        set freifunk.community.dhcpmask=255.255.255.0
+        set freifunk.community.dns='88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222'
+        commit freifunk
+EOF
+       
\ No newline at end of file
index d6a7047..4f2390b 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.luci_ffwizard_leipzig.wizard", package.seeall)
+module("luci.controller.luci_ffwizard_leipzig.wizard", package.seeall)
 
 function index()
        entry({"admin", "index", "wizard"}, action_wizard, "Freifunkassistent", 20)
@@ -6,12 +6,12 @@ end
 
 
 function action_wizard()
-       if ffluci.http.formvalue("ip") then
+       if luci.http.formvalue("ip") then
                return configure_freifunk()
        end
        
        local ifaces = {}
-       local wldevs = ffluci.model.uci.sections("wireless")
+       local wldevs = luci.model.uci.sections("wireless")
        
        if wldevs then
                for k, v in pairs(wldevs) do
@@ -21,12 +21,12 @@ function action_wizard()
                end
        end
        
-       ffluci.template.render("freifunk/wizard", {ifaces=ifaces})
+       luci.template.render("freifunk/wizard", {ifaces=ifaces})
 end
 
 function configure_freifunk()
-       local ip  = ffluci.http.formvalue("ip")
-       local uci = ffluci.model.uci.Session()
+       local ip  = luci.http.formvalue("ip")
+       local uci = luci.model.uci.Session()
        
        -- Load UCI
        uci:t_load("network")
@@ -65,7 +65,7 @@ function configure_freifunk()
        end
        
        -- Routing from Internal
-       local iface = ffluci.http.formvalue("frominternal")
+       local iface = luci.http.formvalue("frominternal")
        if iface and iface ~= "" then
                local routing = uci:t_sections("luci_fw")
                if routing then
@@ -84,7 +84,7 @@ function configure_freifunk()
        end     
        
        -- Routing to External
-       local iface = ffluci.http.formvalue("toexternal")
+       local iface = luci.http.formvalue("toexternal")
        if iface and iface ~= "" then
                local routing = uci:t_sections("luci_fw")
                if routing then
@@ -103,7 +103,7 @@ function configure_freifunk()
        end     
        
        -- Configure DHCP
-       if ffluci.http.formvalue("dhcp") then
+       if luci.http.formvalue("dhcp") then
                local dhcpnet = uci:t_get("freifunk", "community", "dhcp"):match("^([0-9]+)")
                local dhcpip  = ip:gsub("^[0-9]+", dhcpnet)
        
@@ -155,7 +155,7 @@ function configure_freifunk()
                        uci:t_set("luci_fw", int, "oface", "ff")
                        uci:t_set("luci_fw", int, "nat", "1")                   
                        
-                       local iface = ffluci.http.formvalue("toexternal")
+                       local iface = luci.http.formvalue("toexternal")
                        if iface and iface ~= "" then
                                local int = uci:t_add("luci_fw", "routing")
                                uci:t_set("luci_fw", int, "iface", "ffdhcp")
@@ -166,14 +166,14 @@ function configure_freifunk()
        end
        
        -- Configure OLSR
-       if ffluci.http.formvalue("olsr") and uci:t_sections("olsr") then
+       if luci.http.formvalue("olsr") and uci:t_sections("olsr") then
                for k, v in pairs(uci:t_sections("olsr")) do
                        if v[".type"] == "Interface" or v[".type"] == "LoadPlugin" then
                                uci:t_del("olsr", k)
                        end
                end
                
-               if ffluci.http.formvalue("shareinet") then
+               if luci.http.formvalue("shareinet") then
                        uci:t_set("olsr", "dyn_gw", nil, "LoadPlugin")
                        uci:t_set("olsr", "dyn_gw", "Library", "olsrd_dyn_gw.so.0.4")
                end
@@ -205,7 +205,7 @@ function configure_freifunk()
        local wcfg = uci:t_sections("wireless")
        if wcfg then
                for iface, v in pairs(wcfg) do
-                       if v[".type"] == "wifi-device" and ffluci.http.formvalue("wifi."..iface) then
+                       if v[".type"] == "wifi-device" and luci.http.formvalue("wifi."..iface) then
                                -- Cleanup
                                for k, j in pairs(wcfg) do
                                        if j[".type"] == "wifi-iface" and j.device == iface then
@@ -239,5 +239,5 @@ function configure_freifunk()
        uci:t_save("wireless")
        uci:t_save("luci_fw")
 
-       ffluci.http.redirect(ffluci.dispatcher.build_url("admin", "uci", "changes"))
+       luci.http.redirect(luci.dispatcher.build_url("admin", "uci", "changes"))
 end
\ No newline at end of file
index b08703f..e3d6cb4 100644 (file)
@@ -26,7 +26,7 @@
                        <div class="cbi-value-title"><%:cfginternal Erlaube Zugriff von internem Netzwerk%>:</div>
                        <div class="cbi-value-field"><select name="frominternal">
                                <option value=""></option>
-<% for k, v in pairs(ffluci.model.uci.sections("network")) do
+<% for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then %>
 <option value="<%=k%>"<% if k == "lan" then %> selected="selected"<% end %>><%=k%></option>
 <%     end
@@ -37,7 +37,7 @@ end %>
                        <div class="cbi-value-title"><%:cfgexternal Erlaube Zugriff auf externes Netzwerk%>:</div>
                        <div class="cbi-value-field"><select name="toexternal">
                                <option value=""></option>
-<% for k, v in pairs(ffluci.model.uci.sections("network")) do
+<% for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then %>
 <option value="<%=k%>"<% if k == "wan" then %> selected="selected"<% end %>><%=k%></option>
 <%     end
index 9a92b90..4190970 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.luci_fw.luci_fw", package.seeall)
+module("luci.controller.luci_fw.luci_fw", package.seeall)
 
 function index()
        entry({"admin", "network", "portfw"}, cbi("luci_fw/portfw"), "Portweiterleitung", 70)
index 7c89d07..f58f74c 100644 (file)
@@ -19,7 +19,7 @@ iface.optional = true
 oface = s:option(ListValue, "oface", "Ausgangsschnittstelle")
 oface.optional = true
 
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then
                iface:value(k)
                oface:value(k)
index 90ebb4c..e4f4fa2 100644 (file)
@@ -1,5 +1,5 @@
 -- ToDo: Translate, Add descriptions and help texts
-require("ffluci.sys")
+require("luci.sys")
 m = Map("luci_fw", "Portweiterleitung", [[Portweiterleitungen ermöglichen es interne
 Netzwerkdienste von einem anderen externen Netzwerk aus erreichbar zu machen.]])
 
@@ -10,7 +10,7 @@ s.anonymous = true
 
 iface = s:option(ListValue, "iface", "Schnittstelle", "Externe Schnittstelle")
 iface.default = "wan"
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then
                iface:value(k)
        end
index 5805b1d..364e69f 100644 (file)
@@ -1,5 +1,5 @@
 -- ToDo: Translate, Add descriptions and help texts
-require("ffluci.sys")
+require("luci.sys")
 m = Map("luci_fw", "Routing", [[An dieser Stelle wird festlegt, welcher Netzverkehr zwischen einzelnen
 Schnittstellen erlaubt werden soll. Es werden jeweils nur neue Verbindungen
 betrachtet, d.h. Pakete von aufgebauten oder zugehörigen Verbindungen werden automatisch in beide Richtungen
@@ -14,7 +14,7 @@ s.anonymous = true
 iface = s:option(ListValue, "iface", "Eingang", "Eingangsschnittstelle")
 oface = s:option(ListValue, "oface", "Ausgang", "Ausgangsschnittstelle")
 
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then
                iface:value(k)
                oface:value(k)
index 11430f0..545233d 100644 (file)
@@ -2,17 +2,17 @@
 package.path  = "/usr/lib/lua/?.lua;/usr/lib/lua/?/init.lua;" .. package.path
 package.cpath = "/usr/lib/lua/?.so;" .. package.cpath
 
-require("ffluci.http")
-require("ffluci.sys")
-require("ffluci.model.uci")
+require("luci.http")
+require("luci.sys")
+require("luci.model.uci")
 
 local srv
 local net
-local ip = ffluci.http.env.REMOTE_ADDR
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+local ip = luci.http.env.REMOTE_ADDR
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and v.ipaddr then
-               local p = ffluci.sys.net.mask4prefix(v.netmask)
-               if ffluci.sys.net.belongs(ip, v.ipaddr, p) then
+               local p = luci.sys.net.mask4prefix(v.netmask)
+               if luci.sys.net.belongs(ip, v.ipaddr, p) then
                        net = k
                        srv = v.ipaddr
                        break
@@ -21,30 +21,30 @@ for k, v in pairs(ffluci.model.uci.sections("network")) do
 end
 
 local stat = false
-for k, v in pairs(ffluci.model.uci.sections("luci_splash")) do
+for k, v in pairs(luci.model.uci.sections("luci_splash")) do
        if v[".type"] == "iface" and v.network == net then
                stat = true
        end 
 end
 
 if not srv then
-       ffluci.http.prepare_content("text/plain")
+       luci.http.prepare_content("text/plain")
        print("Unable to detect network settings!")
 elseif not stat then
-       ffluci.http.redirect("http://" .. srv)
+       luci.http.redirect("http://" .. srv)
 else
        local action = "splash"
        
-       local mac = ffluci.sys.net.ip4mac(ip)
+       local mac = luci.sys.net.ip4mac(ip)
        if not mac then
                action = "unknown"
        end
        
-       local status = ffluci.sys.execl("luci-splash status "..mac)[1]
+       local status = luci.sys.execl("luci-splash status "..mac)[1]
        
        if status == "whitelisted" or status == "lease" then
                action = "allowed"
        end
        
-       ffluci.http.redirect("http://" .. srv .. "/cgi-bin/luci-splash/" .. action)
+       luci.http.redirect("http://" .. srv .. "/cgi-bin/luci-splash/" .. action)
 end
\ No newline at end of file
index 58387a5..39ba558 100644 (file)
@@ -5,6 +5,6 @@
 <meta http-equiv="refresh" content="0; URL=/cgi-bin/index.cgi" />
 </head>
 <body style="background-color: black">
-<a style="color: white; text-decoration: none" href="/cgi-bin/index.cgi">FFLuCI - Freifunk Lua Configuration Interface</a>
+<a style="color: white; text-decoration: none" href="/cgi-bin/index.cgi">LuCI - Lua Configuration Interface</a>
 </body>
 </html>
\ No newline at end of file
index 2fa6bdd..f62d45c 100644 (file)
@@ -2,12 +2,12 @@
 package.path  = "/usr/lib/lua/?.lua;/usr/lib/lua/?/init.lua;" .. package.path
 package.cpath = "/usr/lib/lua/?.so;" .. package.cpath
 
-require("ffluci.http")
-require("ffluci.sys")
-require("ffluci.model.uci")
+require("luci.http")
+require("luci.sys")
+require("luci.model.uci")
 
 -- Init state session
-uci = ffluci.model.uci.StateSession()
+uci = luci.model.uci.StateSession()
 
 
 function main(argv)
@@ -125,7 +125,7 @@ end
 function listrules()
        local cmd = "iptables -t nat -L luci_splash_leases | grep RETURN |"
        cmd = cmd .. "egrep -io [0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+"
-       return ffluci.util.split(ffluci.sys.exec(cmd))
+       return luci.util.split(luci.sys.exec(cmd))
 end
 
 
index 188ad7a..c75593f 100644 (file)
@@ -1,4 +1,4 @@
 #!/bin/sh
 echo "Status: 302 Found"
-echo "Location: /cgi-bin/ffluci/splash/splash$PATH_INFO"
+echo "Location: /cgi-bin/luci/splash/splash$PATH_INFO"
 echo
\ No newline at end of file
index 7d837cd..544f1e8 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.splash.splash", package.seeall)
+module("luci.controller.splash.splash", package.seeall)
 
 function index()
        local page = node("admin", "services", "splash")
@@ -12,19 +12,19 @@ function index()
 end
 
 function action_activate()
-       local mac = ffluci.sys.net.ip4mac(ffluci.http.env.REMOTE_ADDR)
-       if mac and ffluci.http.formvalue("accept") then
+       local mac = luci.sys.net.ip4mac(luci.http.env.REMOTE_ADDR)
+       if mac and luci.http.formvalue("accept") then
                os.execute("luci-splash add "..mac.." >/dev/null 2>&1")
-               ffluci.http.redirect(ffluci.model.uci.get("freifunk", "community", "homepage"))
+               luci.http.redirect(luci.model.uci.get("freifunk", "community", "homepage"))
        else
-               ffluci.http.redirect(ffluci.dispatcher.build_url())
+               luci.http.redirect(luci.dispatcher.build_url())
        end
 end
 
 function action_allowed()
-       ffluci.http.redirect(ffluci.dispatcher.build_url())
+       luci.http.redirect(luci.dispatcher.build_url())
 end
 
 function action_unknown()
-       ffluci.http.redirect(ffluci.dispatcher.build_url())
+       luci.http.redirect(luci.dispatcher.build_url())
 end
\ No newline at end of file
index fe4d2c3..6050ac8 100644 (file)
@@ -1,5 +1,5 @@
 -- ToDo: Translate, Add descriptions and help texts
-require("ffluci.model.uci")
+require("luci.model.uci")
 
 m = Map("luci_splash", "Client-Splash", [[Client-Splash ist das Freifunk Hotspot-Authentifizierungs-System.]])
 
@@ -11,7 +11,7 @@ s.addremove = true
 s.anonymous = true
 
 iface = s:option(ListValue, "network", "Schnittstelle")
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then
                iface:value(k)
        end
diff --git a/applications/sgi-haserl/root/www/cgi-bin/ffluci b/applications/sgi-haserl/root/www/cgi-bin/ffluci
deleted file mode 100755 (executable)
index f3d85df..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/haserl --shell=luac
-require("ffluci.dispatcher").createindex()
-ffluci.dispatcher.httpdispatch()
\ No newline at end of file
diff --git a/applications/sgi-haserl/root/www/cgi-bin/ffluci-upload b/applications/sgi-haserl/root/www/cgi-bin/ffluci-upload
deleted file mode 100755 (executable)
index c31ddb8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/haserl --shell=luac --upload-limit=16384
--- This is a bit hacky: remove -upload from SCRIPT_NAME
-ENV.SCRIPT_NAME = ENV.SCRIPT_NAME:sub(1, #ENV.SCRIPT_NAME - 7)
-dofile("ffluci")
\ No newline at end of file
index 31705cc..aae8591 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/haserl --shell=luac
 print("Status: 302 Found")
-print("Location: ffluci\n")
+print("Location: luci\n")
diff --git a/applications/sgi-haserl/root/www/cgi-bin/luci b/applications/sgi-haserl/root/www/cgi-bin/luci
new file mode 100755 (executable)
index 0000000..8b06527
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/haserl --shell=luac
+require("luci.dispatcher").createindex()
+luci.dispatcher.httpdispatch()
\ No newline at end of file
diff --git a/applications/sgi-haserl/root/www/cgi-bin/luci-upload b/applications/sgi-haserl/root/www/cgi-bin/luci-upload
new file mode 100755 (executable)
index 0000000..371967c
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/haserl --shell=luac --upload-limit=16384
+-- This is a bit hacky: remove -upload from SCRIPT_NAME
+ENV.SCRIPT_NAME = ENV.SCRIPT_NAME:sub(1, #ENV.SCRIPT_NAME - 7)
+dofile("luci")
\ No newline at end of file
index 58387a5..39ba558 100644 (file)
@@ -5,6 +5,6 @@
 <meta http-equiv="refresh" content="0; URL=/cgi-bin/index.cgi" />
 </head>
 <body style="background-color: black">
-<a style="color: white; text-decoration: none" href="/cgi-bin/index.cgi">FFLuCI - Freifunk Lua Configuration Interface</a>
+<a style="color: white; text-decoration: none" href="/cgi-bin/index.cgi">LuCI - Lua Configuration Interface</a>
 </body>
 </html>
\ No newline at end of file
index f3a6ee6..f3994b5 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - SGI-Module for Haserl
+LuCI - SGI-Module for Haserl
 
 Description:
 Server Gateway Interface for Haserl
@@ -23,30 +23,30 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci.sgi.haserl", package.seeall)
-require("ffluci.fs")
+module("luci.sgi.haserl", package.seeall)
+require("luci.fs")
 
 -- Environment Table
-ffluci.http.env = ENV
+luci.http.env = ENV
 
 -- Returns the main dispatcher URL
-function ffluci.http.dispatcher()
-       return ffluci.http.env.SCRIPT_NAME or ""
+function luci.http.dispatcher()
+       return luci.http.env.SCRIPT_NAME or ""
 end
 
 -- Returns the upload dispatcher URL
-function ffluci.http.dispatcher_upload()
-       return ffluci.http.dispatcher() .. "-upload"
+function luci.http.dispatcher_upload()
+       return luci.http.dispatcher() .. "-upload"
 end
 
 -- Returns a table of all COOKIE, GET and POST Parameters
-function ffluci.http.formvalues()
+function luci.http.formvalues()
        return FORM
 end
 
 -- Gets form value from key
-function ffluci.http.formvalue(key, default)
-       local c = ffluci.http.formvalues()
+function luci.http.formvalue(key, default)
+       local c = luci.http.formvalues()
        
        for match in key:gmatch("[%w-_]+") do
                c = c[match]
@@ -59,39 +59,39 @@ function ffluci.http.formvalue(key, default)
 end
 
 -- Gets a table of values with a certain prefix
-function ffluci.http.formvaluetable(prefix)
-       return ffluci.http.formvalue(prefix, {})
+function luci.http.formvaluetable(prefix)
+       return luci.http.formvalue(prefix, {})
 end
 
 -- Sends a custom HTTP-Header
-function ffluci.http.header(key, value)
+function luci.http.header(key, value)
        print(key .. ": " .. value)
 end
 
 -- Set Content-Type
-function ffluci.http.prepare_content(type)
+function luci.http.prepare_content(type)
        print("Content-Type: "..type.."\n")
 end
 
 -- Asks the browser to redirect to "url"
-function ffluci.http.redirect(url)
-       ffluci.http.status(302, "Found")
-       ffluci.http.header("Location", url)
+function luci.http.redirect(url)
+       luci.http.status(302, "Found")
+       luci.http.header("Location", url)
        print()
 end
 
 -- Returns the path of an uploaded file
 -- WARNING! File uploads can be easily spoofed! Do additional sanity checks!
-function ffluci.http.upload(name)
-       local fpath = ffluci.http.formvalue(name)
-       local fname = ffluci.http.formvalue(name .. "_name")
+function luci.http.upload(name)
+       local fpath = luci.http.formvalue(name)
+       local fname = luci.http.formvalue(name .. "_name")
        
-       if fpath and fname and ffluci.fs.isfile(fpath) then
+       if fpath and fname and luci.fs.isfile(fpath) then
                return fpath
        end
 end
 
 -- Sets HTTP-Status-Header
-function ffluci.http.status(code, message)
+function luci.http.status(code, message)
        print("Status: " .. tostring(code) .. " " .. message)
 end
index f21934e..478c2a9 100644 (file)
@@ -3,7 +3,7 @@ module("webuci", package.seeall)
 function prepare_req(uri)
        env = {}
        env.REQUEST_URI = uri
-       require("ffluci.dispatcher").createindex()
+       require("luci.dispatcher").createindex()
 end
 
 function init_req(context)
@@ -17,5 +17,5 @@ function init_req(context)
 end
 
 function handle_req(context)
-       ffluci.dispatcher.httpdispatch()
+       luci.dispatcher.httpdispatch()
 end
\ No newline at end of file
index f05fd2b..39eab3c 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - SGI-Module for Haserl
+LuCI - SGI-Module for Haserl
 
 Description:
 Server Gateway Interface for Haserl
@@ -23,40 +23,40 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci.sgi.webuci", package.seeall)
+module("luci.sgi.webuci", package.seeall)
 
 -- Environment Table
-ffluci.http.env = webuci.env
+luci.http.env = webuci.env
 
 
 local status_set = false
 
 -- Returns the main dispatcher URL
-function ffluci.http.dispatcher()
-       return ffluci.http.env.SCRIPT_NAME or ""
+function luci.http.dispatcher()
+       return luci.http.env.SCRIPT_NAME or ""
 end
 
 -- Returns the upload dispatcher URL
-function ffluci.http.dispatcher_upload()
+function luci.http.dispatcher_upload()
        -- To be implemented
 end
 
 -- Returns a table of all COOKIE, GET and POST Parameters
-function ffluci.http.formvalues()
+function luci.http.formvalues()
        return webuci.vars
 end
 
 -- Gets form value from key
-function ffluci.http.formvalue(key, default)
-       return ffluci.http.formvalues()[key] or default
+function luci.http.formvalue(key, default)
+       return luci.http.formvalues()[key] or default
 end
 
 -- Gets a table of values with a certain prefix
-function ffluci.http.formvaluetable(prefix)
+function luci.http.formvaluetable(prefix)
        local vals = {}
        prefix = prefix and prefix .. "." or "."
        
-       for k, v in pairs(ffluci.http.formvalues()) do
+       for k, v in pairs(luci.http.formvalues()) do
                if k:find(prefix, 1, true) == 1 then
                        vals[k:sub(#prefix + 1)] = v
                end
@@ -66,34 +66,34 @@ function ffluci.http.formvaluetable(prefix)
 end
 
 -- Sends a custom HTTP-Header
-function ffluci.http.header(key, value)
+function luci.http.header(key, value)
        print(key .. ": " .. value)
 end
 
 -- Set Content-Type
-function ffluci.http.prepare_content(type)
+function luci.http.prepare_content(type)
        if not status_set then
-               ffluci.http.status(200, "OK")
+               luci.http.status(200, "OK")
        end
        
        print("Content-Type: "..type.."\n")
 end
 
 -- Asks the browser to redirect to "url"
-function ffluci.http.redirect(url)
-       ffluci.http.status(302, "Found")
-       ffluci.http.header("Location", url)
+function luci.http.redirect(url)
+       luci.http.status(302, "Found")
+       luci.http.header("Location", url)
        print()
 end
 
 -- Returns the path of an uploaded file
 -- WARNING! File uploads can be easily spoofed! Do additional sanity checks!
-function ffluci.http.upload(name)
+function luci.http.upload(name)
        -- To be implemented
 end
 
 -- Sets HTTP-Status-Header
-function ffluci.http.status(code, message)
+function luci.http.status(code, message)
        print(webuci.env.SERVER_PROTOCOL .. " " .. tostring(code) .. " " .. message)
        status_set = true
 end
index af0b443..6658528 100644 (file)
@@ -1,3 +1,3 @@
 LUAC = luac
 LUAC_OPTIONS = -s
-LUCI_INSTALLDIR = /usr/lib/lua/ffluci
\ No newline at end of file
+LUCI_INSTALLDIR = /usr/lib/lua/luci
\ No newline at end of file
diff --git a/contrib/package/ffluci/Makefile b/contrib/package/ffluci/Makefile
deleted file mode 100644 (file)
index 71d8df2..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-PKG_BRANCH:=trunk
-PKG_SOURCE_URL:=https://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH)
-PKG_REV:=$(shell LC_ALL=C svn info ${PKG_SOURCE_URL} | sed -ne's/^Last Changed Rev: //p')
-
-PKG_NAME:=ffluci
-PKG_VERSION:=0.5+svn$(PKG_REV)
-PKG_RELEASE:=1
-
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_SOURCE_PROTO:=svn
-PKG_SOURCE_VERSION:=$(PKG_REV)
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-# LUA_TARGET:=compile LUAC=$(BUILD_DIR_HOST)/lua/luac
-LUA_TARGET:=source
-
-
-include $(INCLUDE_DIR)/package.mk
-
-define Build/Configure
-endef
-
-define Build/Compile
-       $(MAKE) -C$(PKG_BUILD_DIR) build LUA_TARGET=$(LUA_TARGET)
-endef
-
-
-define Package/ffluci/template
-  SECTION:=admin
-  CATEGORY:=Administration
-  TITLE:=FFLuCI - Freifunk Lua Configuration Interface
-  URL:=http://luci.freifunk-halle.net/
-  MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
-endef
-
-define Package/ffluci/install/template
-       $(CP) $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
-endef
-
-
-define Package/ffluci
-  $(call Package/ffluci/template)
-  MENU:=1
-  DEPENDS:=+lua +luaposix +luci-addons
-endef
-
-define Package/ffluci/conffiles
-/etc/config/luci
-endef
-
-define Package/ffluci/install          
-       $(call Package/ffluci/install/template,$(1),core)
-       $(call Package/ffluci/install/template,$(1),themes/fledermaus)
-endef
-
-
-### Community Packages ###
-
-define Package/ffluci-ff-halle
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci \
-   +ffluci-sgi-haserl +ffluci-mod-freifunk +ffluci-app-splash \
-   +ffluci-app-ffwizard-leipzig \
-   +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
-   +kmod-tun +ip
-  TITLE:=Freifunk Halle Community Meta-Package
-endef
-
-define Package/ffluci-ff-halle/install
-endef
-
-
-define Package/ffluci-ff-leipzig
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci \
-   +ffluci-sgi-haserl +ffluci-mod-freifunk +ffluci-app-splash \
-   +ffluci-app-ffwizard-leipzig \
-   +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
-   +kmod-tun +ip
-  TITLE:=Freifunk Leipzig Community Meta-Package
-endef
-
-define Package/ffluci-ff-leipzig/install
-       $(call Package/ffluci/install/template,$(1),applications/community-leipzig)
-       $(CP) -a ./ipkg/ffluci-ff-leipzig.postinst $(1)/CONTROL/postinst
-endef
-
-
-define Package/ffluci-ff-hannover
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci \
-   +ffluci-sgi-haserl +ffluci-mod-freifunk +ffluci-app-splash \
-   +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
-  TITLE:=Freifunk Hannover Community Meta-Package
-  URL:=http://www.freifunk-hannover.de/
-  MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
-endef
-
-define Package/ffluci-ff-hannover/install
-       $(call Package/ffluci/install/template,$(1),applications/community-hannover)
-       $(CP) -a ./ipkg/ffluci-ff-hannover.postinst $(1)/CONTROL/postinst
-endef
-
-
-### Modules ###
-
-define Package/ffluci-mod-admin-core
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci
-  TITLE:=Core administrative pages
-endef
-
-define Package/ffluci-mod-admin-core/install
-       $(call Package/ffluci/install/template,$(1),modules/admin-core)
-endef
-
-
-define Package/ffluci-mod-freifunk
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci +ffluci-mod-admin-core +ffluci-app-firewall
-  TITLE:=Freifunk public and administrative pages
-endef
-
-define Package/ffluci-mod-freifunk/conffiles
-/etc/config/freifunk
-endef
-
-define Package/ffluci-mod-freifunk/install
-       $(call Package/ffluci/install/template,$(1),modules/freifunk)
-endef
-
-
-
-### Applications ###
-
-define Package/ffluci-app-ffwizard-leipzig
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci +ffluci-mod-freifunk
-  TITLE:=Freifunk Leipzig configuration wizard
-endef
-
-define Package/ffluci-app-ffwizard-leipzig/install
-       $(call Package/ffluci/install/template,$(1),applications/luci-ffwizard-leipzig)
-endef
-
-
-define Package/ffluci-app-firewall
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci +ffluci-mod-admin-core
-  TITLE:=Firewall and Portforwarding application
-endef
-
-define Package/ffluci-app-firewall/conffiles
-/etc/config/luci_fw
-endef
-
-define Package/ffluci-app-firewall/install
-       $(call Package/ffluci/install/template,$(1),applications/luci-fw)
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-fw/dist/etc/init.d/luci_fw $(1)/etc/init.d
-endef
-
-
-define Package/ffluci-app-splash
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci +ffluci-mod-freifunk +ffluci-sgi-haserl +iptables-mod-nat +iptables-mod-ipopt
-  TITLE:=Freifunk DHCP-Splash application
-endef
-
-define Package/ffluci-app-splash/conffiles
-/etc/config/luci_splash
-endef
-
-define Package/ffluci-app-splash/install
-       $(call Package/ffluci/install/template,$(1),applications/luci-splash)
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/sbin/luci-splash $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi $(1)/usr/lib/luci-splash/htdocs/cgi-bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash
-endef
-
-
-
-### Server Gateway Interfaces ###
-
-define Package/ffluci-sgi-haserl
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci +haserl-lua
-  TITLE:=SGI for Haserl
-endef
-
-define Package/ffluci-sgi-haserl/install
-       $(call Package/ffluci/install/template,$(1),applications/sgi-haserl)
-       $(CP) -a ./ipkg/ffluci-sgi-haserl.postinst $(1)/CONTROL/postinst
-endef
-
-
-define Package/ffluci-sgi-webuci
-  $(call Package/ffluci/template)
-  DEPENDS:=ffluci
-  TITLE:=SGI for Webuci
-endef
-
-define Package/ffluci-sgi-webuci/install
-       $(call Package/ffluci/install/template,$(1),applications/sgi-webuci)
-endef
-
-
-
-
-$(eval $(call BuildPackage,ffluci))
-
-$(eval $(call BuildPackage,ffluci-ff-halle))
-$(eval $(call BuildPackage,ffluci-ff-leipzig))
-$(eval $(call BuildPackage,ffluci-ff-hannover))
-
-$(eval $(call BuildPackage,ffluci-mod-admin-core))
-$(eval $(call BuildPackage,ffluci-mod-freifunk))
-
-$(eval $(call BuildPackage,ffluci-app-ffwizard-leipzig))
-$(eval $(call BuildPackage,ffluci-app-firewall))
-$(eval $(call BuildPackage,ffluci-app-splash))
-
-$(eval $(call BuildPackage,ffluci-sgi-haserl))
-$(eval $(call BuildPackage,ffluci-sgi-webuci))
diff --git a/contrib/package/ffluci/ipkg/ffluci-ff-hannover.postinst b/contrib/package/ffluci/ipkg/ffluci-ff-hannover.postinst
deleted file mode 100644 (file)
index 5c213ad..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-[ -n "${IPKG_INSTROOT}" ] || {
-       ( . /etc/uci-defaults/ffluci-community-hannover ) &&    rm -f /etc/uci-defaults/ffluci-community-hannover
-}
diff --git a/contrib/package/ffluci/ipkg/ffluci-ff-leipzig.postinst b/contrib/package/ffluci/ipkg/ffluci-ff-leipzig.postinst
deleted file mode 100755 (executable)
index 26eace9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-[ -n "${IPKG_INSTROOT}" ] || {
-       ( . /etc/uci-defaults/ffluci-community-leipzig ) &&     rm -f /etc/uci-defaults/ffluci-community-leipzig
-}
diff --git a/contrib/package/ffluci/ipkg/ffluci-sgi-haserl.postinst b/contrib/package/ffluci/ipkg/ffluci-sgi-haserl.postinst
deleted file mode 100755 (executable)
index b6703dc..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-PATTERNS='/cgi-bin/ffluci/admin:root:$p$root /cgi-bin/ffluci-upload:root:$p$root'
-
-for i in $PATTERNS
-do
-       grep "$i" ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo "$i" >> ${IPKG_INSTROOT}/etc/httpd.conf
-done 
-
-[ -n ${IPKG_INSTROOT} ] || /etc/init.d/httpd restart
index bc8cb44..3115821 100644 (file)
@@ -12,7 +12,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://dev.leipzig.freifunk.net/svn/ff-luci/trunk/contrib/package-source/ \
-       http://firmware.freifunk-halle.net/ffluci/package-source/
+       http://firmware.freifunk-halle.net/luci/package-source/
 PKG_MD5SUM:=b004005594b84e35839b1d5c330f8e03
 
 
index 0456225..3428eb0 100644 (file)
@@ -17,7 +17,7 @@ endef
 define Package/luci-addons
   SECTION:=utils
   CATEGORY:=Utilities
-  TITLE:=FFLuCI System Addons for Kamikaze
+  TITLE:=LuCI System Addons for Kamikaze
   URL:=http://luci.freifunk-halle.net
 endef
 
@@ -28,7 +28,7 @@ define Package/luci-addons/install
        $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
 
        $(INSTALL_BIN) ./dist/usr/bin/run-parts $(1)/usr/bin
-       $(INSTALL_BIN) ./dist/sbin/ffluci-flash $(1)/sbin
+       $(INSTALL_BIN) ./dist/sbin/luci-flash $(1)/sbin
        
        $(CP) ./dist/etc/crontabs/root $(1)/etc/crontabs/root
        $(CP) ./dist/etc/hotplug.d/iface/20-aliases $(1)/etc/hotplug.d/iface/20-aliases
diff --git a/contrib/package/luci-addons/dist/sbin/ffluci-flash b/contrib/package/luci-addons/dist/sbin/ffluci-flash
deleted file mode 100644 (file)
index 3ff478f..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh
-. /etc/functions.sh
-
-# initialize defaults
-RAMFS_COPY_BIN=""       # extra programs for temporary ramfs root
-RAMFS_COPY_DATA=""      # extra data files
-export KEEP_PATTERN=""
-export VERBOSE=1
-
-# parse options
-while [ -n "$1" ]; do
-        case "$1" in
-                -k)
-                               shift
-                               export KEEP_PATTERN="$1"
-                ;;
-                -*)
-                        echo "Invalid option: $1"
-                        exit 1
-                ;;
-                *) break;;
-        esac
-        shift;
-done
-
-export CONFFILES=/tmp/sysupgrade.conffiles
-export CONF_TAR=/tmp/sysupgrade.tgz
-
-[ -f $CONFFILES ] && rm $CONFFILES
-[ -f $CONF_TAR ]  && rm $CONF_TAR
-
-export ARGV="$*"
-export ARGC="$#"
-
-[ -z "$ARGV" ] && {
-        cat <<EOF
-Usage: $0 [options] <image file or URL>
-
-Options:
-        -k     <"file 1, file 2, ..."> Files to be kept
-EOF
-        exit 1
-}
-
-add_pattern_conffiles() {
-       local file="$1"
-       find $KEEP_PATTERN >> "$file" 2>/dev/null
-       return 0
-}
-
-# hooks
-sysupgrade_image_check="platform_check_image"
-sysupgrade_init_conffiles=""
-
-[ -n "$KEEP_PATTERN" ] && append sysupgrade_init_conffiles "add_pattern_conffiles"
-
-include /lib/upgrade
-
-do_save_conffiles() {
-        [ -z "$(rootfs_type)" ] && {
-                echo "Cannot save config while running from ramdisk."
-                exit 3
-                return 0
-        }
-        run_hooks "$CONFFILES" $sysupgrade_init_conffiles
-
-        v "Saving config files..."
-        [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
-        tar c${TAR_V}zf "$CONF_TAR" -T "$CONFFILES" 2>/dev/null
-}
-
-type platform_check_image >/dev/null 2>/dev/null || {
-        echo "Firmware upgrade is not implemented for this platform."
-        exit 1
-}
-
-for check in $sysupgrade_image_check; do
-        ( eval "$check \"\$ARGV\"" ) || {
-                echo "Image check '$check' failed."
-                exit 2
-        }
-done
-
-[ -n "$sysupgrade_init_conffiles" ] && do_save_conffiles
-run_hooks "" $sysupgrade_pre_upgrade
-
-v "Switching to ramdisk..."
-run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade'
\ No newline at end of file
diff --git a/contrib/package/luci-addons/dist/sbin/luci-flash b/contrib/package/luci-addons/dist/sbin/luci-flash
new file mode 100644 (file)
index 0000000..3ff478f
--- /dev/null
@@ -0,0 +1,88 @@
+#!/bin/sh
+. /etc/functions.sh
+
+# initialize defaults
+RAMFS_COPY_BIN=""       # extra programs for temporary ramfs root
+RAMFS_COPY_DATA=""      # extra data files
+export KEEP_PATTERN=""
+export VERBOSE=1
+
+# parse options
+while [ -n "$1" ]; do
+        case "$1" in
+                -k)
+                               shift
+                               export KEEP_PATTERN="$1"
+                ;;
+                -*)
+                        echo "Invalid option: $1"
+                        exit 1
+                ;;
+                *) break;;
+        esac
+        shift;
+done
+
+export CONFFILES=/tmp/sysupgrade.conffiles
+export CONF_TAR=/tmp/sysupgrade.tgz
+
+[ -f $CONFFILES ] && rm $CONFFILES
+[ -f $CONF_TAR ]  && rm $CONF_TAR
+
+export ARGV="$*"
+export ARGC="$#"
+
+[ -z "$ARGV" ] && {
+        cat <<EOF
+Usage: $0 [options] <image file or URL>
+
+Options:
+        -k     <"file 1, file 2, ..."> Files to be kept
+EOF
+        exit 1
+}
+
+add_pattern_conffiles() {
+       local file="$1"
+       find $KEEP_PATTERN >> "$file" 2>/dev/null
+       return 0
+}
+
+# hooks
+sysupgrade_image_check="platform_check_image"
+sysupgrade_init_conffiles=""
+
+[ -n "$KEEP_PATTERN" ] && append sysupgrade_init_conffiles "add_pattern_conffiles"
+
+include /lib/upgrade
+
+do_save_conffiles() {
+        [ -z "$(rootfs_type)" ] && {
+                echo "Cannot save config while running from ramdisk."
+                exit 3
+                return 0
+        }
+        run_hooks "$CONFFILES" $sysupgrade_init_conffiles
+
+        v "Saving config files..."
+        [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
+        tar c${TAR_V}zf "$CONF_TAR" -T "$CONFFILES" 2>/dev/null
+}
+
+type platform_check_image >/dev/null 2>/dev/null || {
+        echo "Firmware upgrade is not implemented for this platform."
+        exit 1
+}
+
+for check in $sysupgrade_image_check; do
+        ( eval "$check \"\$ARGV\"" ) || {
+                echo "Image check '$check' failed."
+                exit 2
+        }
+done
+
+[ -n "$sysupgrade_init_conffiles" ] && do_save_conffiles
+run_hooks "" $sysupgrade_pre_upgrade
+
+v "Switching to ramdisk..."
+run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade'
\ No newline at end of file
diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile
new file mode 100644 (file)
index 0000000..e7d3e90
--- /dev/null
@@ -0,0 +1,230 @@
+include $(TOPDIR)/rules.mk
+
+PKG_BRANCH:=trunk
+PKG_SOURCE_URL:=https://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH)
+PKG_REV:=$(shell LC_ALL=C svn info ${PKG_SOURCE_URL} | sed -ne's/^Last Changed Rev: //p')
+
+PKG_NAME:=luci
+PKG_VERSION:=0.5+svn$(PKG_REV)
+PKG_RELEASE:=1
+
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
+PKG_SOURCE_PROTO:=svn
+PKG_SOURCE_VERSION:=$(PKG_REV)
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+# LUA_TARGET:=compile LUAC=$(BUILD_DIR_HOST)/lua/luac
+LUA_TARGET:=source
+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Build/Configure
+endef
+
+define Build/Compile
+       $(MAKE) -C$(PKG_BUILD_DIR) build LUA_TARGET=$(LUA_TARGET)
+endef
+
+
+define Package/luci/template
+  SECTION:=admin
+  CATEGORY:=Administration
+  TITLE:=LuCI - Lua Configuration Interface
+  URL:=http://luci.freifunk-halle.net/
+  MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
+endef
+
+define Package/luci/install/template
+       $(CP) $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
+endef
+
+
+define Package/luci
+  $(call Package/luci/template)
+  MENU:=1
+  DEPENDS:=+lua +luaposix +luci-addons
+endef
+
+define Package/luci/conffiles
+/etc/config/luci
+endef
+
+define Package/luci/install            
+       $(call Package/luci/install/template,$(1),core)
+       $(call Package/luci/install/template,$(1),themes/fledermaus)
+endef
+
+
+### Community Packages ###
+
+define Package/luci-ff-halle
+  $(call Package/luci/template)
+  DEPENDS:=luci \
+   +luci-sgi-haserl +luci-mod-freifunk +luci-app-splash \
+   +luci-app-ffwizard-leipzig \
+   +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
+   +kmod-tun +ip
+  TITLE:=Freifunk Halle Community Meta-Package
+endef
+
+define Package/luci-ff-halle/install
+endef
+
+
+define Package/luci-ff-leipzig
+  $(call Package/luci/template)
+  DEPENDS:=luci \
+   +luci-sgi-haserl +luci-mod-freifunk +luci-app-splash \
+   +luci-app-ffwizard-leipzig \
+   +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
+   +kmod-tun +ip
+  TITLE:=Freifunk Leipzig Community Meta-Package
+endef
+
+define Package/luci-ff-leipzig/install
+       $(call Package/luci/install/template,$(1),applications/community-leipzig)
+       $(CP) -a ./ipkg/luci-ff-leipzig.postinst $(1)/CONTROL/postinst
+endef
+
+
+define Package/luci-ff-hannover
+  $(call Package/luci/template)
+  DEPENDS:=luci \
+   +luci-sgi-haserl +luci-mod-freifunk +luci-app-splash \
+   +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
+  TITLE:=Freifunk Hannover Community Meta-Package
+  URL:=http://www.freifunk-hannover.de/
+  MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
+endef
+
+define Package/luci-ff-hannover/install
+       $(call Package/luci/install/template,$(1),applications/community-hannover)
+       $(CP) -a ./ipkg/luci-ff-hannover.postinst $(1)/CONTROL/postinst
+endef
+
+
+### Modules ###
+
+define Package/luci-mod-admin-core
+  $(call Package/luci/template)
+  DEPENDS:=luci
+  TITLE:=Core administrative pages
+endef
+
+define Package/luci-mod-admin-core/install
+       $(call Package/luci/install/template,$(1),modules/admin-core)
+endef
+
+
+define Package/luci-mod-freifunk
+  $(call Package/luci/template)
+  DEPENDS:=luci +luci-mod-admin-core +luci-app-firewall
+  TITLE:=Freifunk public and administrative pages
+endef
+
+define Package/luci-mod-freifunk/conffiles
+/etc/config/freifunk
+endef
+
+define Package/luci-mod-freifunk/install
+       $(call Package/luci/install/template,$(1),modules/freifunk)
+endef
+
+
+
+### Applications ###
+
+define Package/luci-app-ffwizard-leipzig
+  $(call Package/luci/template)
+  DEPENDS:=luci +luci-mod-freifunk
+  TITLE:=Freifunk Leipzig configuration wizard
+endef
+
+define Package/luci-app-ffwizard-leipzig/install
+       $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
+endef
+
+
+define Package/luci-app-firewall
+  $(call Package/luci/template)
+  DEPENDS:=luci +luci-mod-admin-core
+  TITLE:=Firewall and Portforwarding application
+endef
+
+define Package/luci-app-firewall/conffiles
+/etc/config/luci_fw
+endef
+
+define Package/luci-app-firewall/install
+       $(call Package/luci/install/template,$(1),applications/luci-fw)
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-fw/dist/etc/init.d/luci_fw $(1)/etc/init.d
+endef
+
+
+define Package/luci-app-splash
+  $(call Package/luci/template)
+  DEPENDS:=luci +luci-mod-freifunk +luci-sgi-haserl +iptables-mod-nat +iptables-mod-ipopt
+  TITLE:=Freifunk DHCP-Splash application
+endef
+
+define Package/luci-app-splash/conffiles
+/etc/config/luci_splash
+endef
+
+define Package/luci-app-splash/install
+       $(call Package/luci/install/template,$(1),applications/luci-splash)
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/sbin/luci-splash $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi $(1)/usr/lib/luci-splash/htdocs/cgi-bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash
+endef
+
+
+
+### Server Gateway Interfaces ###
+
+define Package/luci-sgi-haserl
+  $(call Package/luci/template)
+  DEPENDS:=luci +haserl-lua
+  TITLE:=SGI for Haserl
+endef
+
+define Package/luci-sgi-haserl/install
+       $(call Package/luci/install/template,$(1),applications/sgi-haserl)
+       $(CP) -a ./ipkg/luci-sgi-haserl.postinst $(1)/CONTROL/postinst
+endef
+
+
+define Package/luci-sgi-webuci
+  $(call Package/luci/template)
+  DEPENDS:=luci
+  TITLE:=SGI for Webuci
+endef
+
+define Package/luci-sgi-webuci/install
+       $(call Package/luci/install/template,$(1),applications/sgi-webuci)
+endef
+
+
+
+
+$(eval $(call BuildPackage,luci))
+
+$(eval $(call BuildPackage,luci-ff-halle))
+$(eval $(call BuildPackage,luci-ff-leipzig))
+$(eval $(call BuildPackage,luci-ff-hannover))
+
+$(eval $(call BuildPackage,luci-mod-admin-core))
+$(eval $(call BuildPackage,luci-mod-freifunk))
+
+$(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
+$(eval $(call BuildPackage,luci-app-firewall))
+$(eval $(call BuildPackage,luci-app-splash))
+
+$(eval $(call BuildPackage,luci-sgi-haserl))
+$(eval $(call BuildPackage,luci-sgi-webuci))
diff --git a/contrib/package/luci/ipkg/luci-ff-hannover.postinst b/contrib/package/luci/ipkg/luci-ff-hannover.postinst
new file mode 100644 (file)
index 0000000..b41179f
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ -n "${IPKG_INSTROOT}" ] || {
+       ( . /etc/uci-defaults/luci-community-hannover ) &&      rm -f /etc/uci-defaults/luci-community-hannover
+}
diff --git a/contrib/package/luci/ipkg/luci-ff-leipzig.postinst b/contrib/package/luci/ipkg/luci-ff-leipzig.postinst
new file mode 100755 (executable)
index 0000000..5aff5db
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ -n "${IPKG_INSTROOT}" ] || {
+       ( . /etc/uci-defaults/luci-community-leipzig ) &&       rm -f /etc/uci-defaults/luci-community-leipzig
+}
diff --git a/contrib/package/luci/ipkg/luci-sgi-haserl.postinst b/contrib/package/luci/ipkg/luci-sgi-haserl.postinst
new file mode 100755 (executable)
index 0000000..483a086
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+PATTERNS='/cgi-bin/luci/admin:root:$p$root /cgi-bin/luci-upload:root:$p$root'
+
+for i in $PATTERNS
+do
+       grep "$i" ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo "$i" >> ${IPKG_INSTROOT}/etc/httpd.conf
+done 
+
+[ -n ${IPKG_INSTROOT} ] || /etc/init.d/httpd restart
index 7a7aa33..ded6578 100644 (file)
@@ -1,7 +1,7 @@
 config core main
     option lang de
-    option mediaurlbase /ffluci/media
-       option resourcebase /ffluci/images
+    option mediaurlbase /luci/media
+       option resourcebase /luci/images
        option title            "Freifunk Kamikaze"
        option subtitle         Fledermausedition
                
@@ -32,4 +32,4 @@ config internal languages
                option en "English"
                
 config internal themes
-               option Fledermaus "/ffluci/media"
+               option Fledermaus "/luci/media"
index f8434c3..13b4c30 100644 (file)
@@ -50,7 +50,7 @@
 
 --]]
 
-module("ffluci.bits", package.seeall);
+module("luci.bits", package.seeall);
 
 local hex2bin = {
        ["0"] = "0000",
index 8a623b6..b7097b5 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Configuration Bind Interface
+LuCI - Configuration Bind Interface
 
 Description:
 Offers an interface for binding confiugration values to certain
@@ -24,35 +24,35 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci.cbi", package.seeall)
+module("luci.cbi", package.seeall)
 
-require("ffluci.template")
-require("ffluci.util")
-require("ffluci.http")
-require("ffluci.model.uci")
+require("luci.template")
+require("luci.util")
+require("luci.http")
+require("luci.model.uci")
 
-local class      = ffluci.util.class
-local instanceof = ffluci.util.instanceof
+local class      = luci.util.class
+local instanceof = luci.util.instanceof
 
 -- Loads a CBI map from given file, creating an environment and returns it
 function load(cbimap)
-       require("ffluci.fs")
-       require("ffluci.i18n")
-       require("ffluci.config")
-       require("ffluci.sys")
+       require("luci.fs")
+       require("luci.i18n")
+       require("luci.config")
+       require("luci.sys")
        
-       local cbidir = ffluci.sys.libpath() .. "/model/cbi/"
+       local cbidir = luci.sys.libpath() .. "/model/cbi/"
        local func, err = loadfile(cbidir..cbimap..".lua")
        
        if not func then
                return nil
        end
        
-       ffluci.i18n.loadc("cbi")
+       luci.i18n.loadc("cbi")
        
-       ffluci.util.resfenv(func)
-       ffluci.util.updfenv(func, ffluci.cbi)
-       ffluci.util.extfenv(func, "translate", ffluci.i18n.translate)
+       luci.util.resfenv(func)
+       luci.util.updfenv(func, luci.cbi)
+       luci.util.extfenv(func, "translate", luci.i18n.translate)
        
        local map = func()
        
@@ -91,7 +91,7 @@ function Node.render(self, scope)
        scope = scope or {}
        scope.self = self
 
-       ffluci.template.render(self.template, scope)
+       luci.template.render(self.template, scope)
 end
 
 -- Render the children
@@ -122,7 +122,7 @@ function Map.__init__(self, config, ...)
        Node.__init__(self, ...)
        self.config = config
        self.template = "cbi/map"
-       self.uci = ffluci.model.uci.Session()
+       self.uci = luci.model.uci.Session()
        self.ucidata, self.uciorder = self.uci:sections(self.config)
        if not self.ucidata or not self.uciorder then
                error("Unable to read UCI data: " .. self.config)
@@ -242,7 +242,7 @@ function AbstractSection.parse_optionals(self, section)
        
        self.optionals[section] = {}
        
-       local field = ffluci.http.formvalue("cbi.opt."..self.config.."."..section)
+       local field = luci.http.formvalue("cbi.opt."..self.config.."."..section)
        for k,v in ipairs(self.children) do
                if v.optional and not v:cfgvalue(section) then
                        if field == v.option then
@@ -270,8 +270,8 @@ function AbstractSection.parse_dynamic(self, section)
                return
        end
        
-       local arr  = ffluci.util.clone(self:cfgvalue(section))
-       local form = ffluci.http.formvaluetable("cbid."..self.config.."."..section)
+       local arr  = luci.util.clone(self:cfgvalue(section))
+       local form = luci.http.formvaluetable("cbid."..self.config.."."..section)
        for k, v in pairs(form) do
                arr[k] = v
        end
@@ -329,11 +329,11 @@ function NamedSection.parse(self)
        if self.addremove then
                local path = self.config.."."..s
                if active then -- Remove the section
-                       if ffluci.http.formvalue("cbi.rns."..path) and self:remove(s) then
+                       if luci.http.formvalue("cbi.rns."..path) and self:remove(s) then
                                return
                        end
                else           -- Create and apply default values
-                       if ffluci.http.formvalue("cbi.cns."..path) and self:create(s) then
+                       if luci.http.formvalue("cbi.cns."..path) and self:create(s) then
                                for k,v in pairs(self.children) do
                                        v:write(s, v.default)
                                end
@@ -343,7 +343,7 @@ function NamedSection.parse(self)
        
        if active then
                AbstractSection.parse_dynamic(self, s)
-               if ffluci.http.formvalue("cbi.submit") then
+               if luci.http.formvalue("cbi.submit") then
                        Node.parse(self, s)
                end
                AbstractSection.parse_optionals(self, s)
@@ -413,7 +413,7 @@ function TypedSection.parse(self)
        if self.addremove then
                -- Create
                local crval = "cbi.cts." .. self.config .. "." .. self.sectiontype
-               local name  = ffluci.http.formvalue(crval)
+               local name  = luci.http.formvalue(crval)
                if self.anonymous then
                        if name then
                                self:create()
@@ -439,7 +439,7 @@ function TypedSection.parse(self)
                
                -- Remove
                crval = "cbi.rts." .. self.config
-               name = ffluci.http.formvaluetable(crval)
+               name = luci.http.formvaluetable(crval)
                for k,v in pairs(name) do
                        if self:cfgvalue(k) and self:checkscope(k) then
                                self:remove(k)
@@ -449,7 +449,7 @@ function TypedSection.parse(self)
        
        for i, k in ipairs(self:cfgsections()) do
                AbstractSection.parse_dynamic(self, k)
-               if ffluci.http.formvalue("cbi.submit") then
+               if luci.http.formvalue("cbi.submit") then
                        Node.parse(self, k)
                end
                AbstractSection.parse_optionals(self, k)
@@ -522,13 +522,13 @@ end
 -- Return whether this object should be created
 function AbstractValue.formcreated(self, section)
        local key = "cbi.opt."..self.config.."."..section
-       return (ffluci.http.formvalue(key) == self.option)
+       return (luci.http.formvalue(key) == self.option)
 end
 
 -- Returns the formvalue for this object
 function AbstractValue.formvalue(self, section)
        local key = "cbid."..self.map.config.."."..section.."."..self.option
-       return ffluci.http.formvalue(key)
+       return luci.http.formvalue(key)
 end
 
 function AbstractValue.parse(self, section)
@@ -605,7 +605,7 @@ function Value.validate(self, val)
                val = nil
        end
        
-       return ffluci.util.validate(val, self.isnumber, self.isinteger)
+       return luci.util.validate(val, self.isnumber, self.isinteger)
 end
 
 
@@ -623,7 +623,7 @@ function DummyValue.parse(self)
 end
 
 function DummyValue.render(self, s)
-       ffluci.template.render(self.template, {self=self, section=s})
+       luci.template.render(self.template, {self=self, section=s})
 end
 
 
@@ -684,7 +684,7 @@ function ListValue.value(self, key, val)
 end
 
 function ListValue.validate(self, val)
-       if ffluci.util.contains(self.keylist, val) then
+       if luci.util.contains(self.keylist, val) then
                return val
        else
                return nil
@@ -723,7 +723,7 @@ function MultiValue.valuelist(self, section)
                return {}
        end
        
-       return ffluci.util.split(val, self.delimiter)
+       return luci.util.split(val, self.delimiter)
 end
 
 function MultiValue.validate(self, val)
@@ -734,7 +734,7 @@ function MultiValue.validate(self, val)
        local result = ""
        
        for value in val:gmatch("[^\n]+") do
-               if ffluci.util.contains(self.keylist, value) then
+               if luci.util.contains(self.keylist, value) then
                        result = result .. self.delimiter .. value
                end 
        end
index 0db45ac..854b128 100644 (file)
@@ -1,8 +1,8 @@
 --[[
-FFLuCI - Configuration
+LuCI - Configuration
 
 Description:
-Some FFLuCI configuration values read from uci file "luci"
+Some LuCI configuration values read from uci file "luci"
 
 
 FileId:
@@ -25,16 +25,16 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.config", package.seeall)
-require("ffluci.model.uci")
-require("ffluci.util")
-require("ffluci.sys")
+module("luci.config", package.seeall)
+require("luci.model.uci")
+require("luci.util")
+require("luci.sys")
 
 -- Warning! This is only for fallback and compatibility purporses! --
 main = {}
 
 -- This is where stylesheets and images go
-main.mediaurlbase = "/ffluci/media"
+main.mediaurlbase = "/luci/media"
 
 -- Does anybody think about browser autodetect here?
 -- Too bad busybox doesn't populate HTTP_ACCEPT_LANGUAGE
@@ -42,7 +42,7 @@ main.lang = "de"
 
 
 -- Now overwrite with UCI values
-local ucidata = ffluci.model.uci.sections("luci")
+local ucidata = luci.model.uci.sections("luci")
 if ucidata then
-       ffluci.util.update(ffluci.config, ucidata)
+       luci.util.update(luci.config, ucidata)
 end
\ No newline at end of file
index 1be4034..a56400f 100644 (file)
@@ -1,2 +1,2 @@
-module("ffluci.debug", package.seeall)
+module("luci.debug", package.seeall)
 __file__ = debug.getinfo(1, 'S').source:sub(2)
\ No newline at end of file
index fce0ce2..daf975e 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Dispatcher
+LuCI - Dispatcher
 
 Description:
 The request dispatcher and module dispatcher generators
@@ -23,10 +23,10 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci.dispatcher", package.seeall)
-require("ffluci.http")
-require("ffluci.sys")
-require("ffluci.fs")
+module("luci.dispatcher", package.seeall)
+require("luci.http")
+require("luci.sys")
+require("luci.fs")
 
 -- Local dispatch database
 local tree = {nodes={}}
@@ -40,17 +40,17 @@ dispatched = nil
 
 -- Builds a URL
 function build_url(...)
-       return ffluci.http.dispatcher() .. "/" .. table.concat(arg, "/")
+       return luci.http.dispatcher() .. "/" .. table.concat(arg, "/")
 end
 
 -- Sends a 404 error code and renders the "error404" template if available
 function error404(message)
-       ffluci.http.status(404, "Not Found")
+       luci.http.status(404, "Not Found")
        message = message or "Not Found"
 
-       require("ffluci.template")
-       if not pcall(ffluci.template.render, "error404") then
-               ffluci.http.prepare_content("text/plain")
+       require("luci.template")
+       if not pcall(luci.template.render, "error404") then
+               luci.http.prepare_content("text/plain")
                print(message)
        end
        return false
@@ -58,11 +58,11 @@ end
 
 -- Sends a 500 error code and renders the "error500" template if available
 function error500(message)
-       ffluci.http.status(500, "Internal Server Error")
+       luci.http.status(500, "Internal Server Error")
 
-       require("ffluci.template")
-       if not pcall(ffluci.template.render, "error500", {message=message}) then
-               ffluci.http.prepare_content("text/plain")
+       require("luci.template")
+       if not pcall(luci.template.render, "error500", {message=message}) then
+               luci.http.prepare_content("text/plain")
                print(message)
        end
        return false
@@ -70,7 +70,7 @@ end
 
 -- Dispatches a request depending on the PATH_INFO variable
 function httpdispatch()
-       local pathinfo = ffluci.http.env.PATH_INFO or ""
+       local pathinfo = luci.http.env.PATH_INFO or ""
        local c = tree
 
        for s in pathinfo:gmatch("/([%w-]+)") do
@@ -97,15 +97,15 @@ function dispatch()
 
 
        if track.i18n then
-               require("ffluci.i18n").loadc(track.i18n)
+               require("luci.i18n").loadc(track.i18n)
        end
 
        if track.setgroup then
-               ffluci.sys.process.setgroup(track.setgroup)
+               luci.sys.process.setgroup(track.setgroup)
        end
 
        if track.setuser then
-               ffluci.sys.process.setuser(track.setuser)
+               luci.sys.process.setuser(track.setuser)
        end
 
 
@@ -124,20 +124,20 @@ end
 
 -- Calls the index function of all available controllers
 function createindex()
-       local root = ffluci.sys.libpath() .. "/controller/"
+       local root = luci.sys.libpath() .. "/controller/"
        local suff = ".lua"
 
-       local controllers = ffluci.util.combine(
-               ffluci.fs.glob(root .. "*" .. suff),
-               ffluci.fs.glob(root .. "*/*" .. suff)
+       local controllers = luci.util.combine(
+               luci.fs.glob(root .. "*" .. suff),
+               luci.fs.glob(root .. "*/*" .. suff)
        )
 
        for i,c in ipairs(controllers) do
-               c = "ffluci.controller." .. c:sub(#root+1, #c-#suff):gsub("/", ".")
+               c = "luci.controller." .. c:sub(#root+1, #c-#suff):gsub("/", ".")
                stat, mod = pcall(require, c)
 
                if stat and mod and type(mod.index) == "function" then
-                       ffluci.util.updfenv(mod.index, ffluci.dispatcher)
+                       luci.util.updfenv(mod.index, luci.dispatcher)
                        pcall(mod.index)
                end
        end
@@ -188,16 +188,16 @@ function alias(...)
 end
 
 function template(name)
-       require("ffluci.template")
-       return function() ffluci.template.render(name) end
+       require("luci.template")
+       return function() luci.template.render(name) end
 end
 
 function cbi(model)
-       require("ffluci.cbi")
-       require("ffluci.template")
+       require("luci.cbi")
+       require("luci.template")
 
        return function()
-               local stat, res = pcall(ffluci.cbi.load, model)
+               local stat, res = pcall(luci.cbi.load, model)
                if not stat then
                        error500(res)
                        return true
@@ -209,8 +209,8 @@ function cbi(model)
                        return true
                end
 
-               ffluci.template.render("cbi/header")
+               luci.template.render("cbi/header")
                res:render()
-               ffluci.template.render("cbi/footer")
+               luci.template.render("cbi/footer")
        end
 end
index fc47287..5c1f2a0 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Filesystem tools
+LuCI - Filesystem tools
 
 Description:
 A module offering often needed filesystem manipulation functions
@@ -24,7 +24,7 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.fs", package.seeall)
+module("luci.fs", package.seeall)
 
 require("posix")
 
index f4ba570..fa8821c 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - HTTP-Interaction
+LuCI - HTTP-Interaction
 
 Description:
 HTTP-Header manipulator and form variable preprocessor
@@ -27,10 +27,10 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.http", package.seeall)
+module("luci.http", package.seeall)
 
 if ENV and ENV.HASERLVER then
-       require("ffluci.sgi.haserl")
+       require("luci.sgi.haserl")
 elseif webuci then
-       require("ffluci.sgi.webuci")
+       require("luci.sgi.webuci")
 end
\ No newline at end of file
index 4e41873..3a8a9a6 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Internationalisation
+LuCI - Internationalisation
 
 Description:
 A very minimalistic but yet effective internationalisation module
@@ -24,11 +24,11 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.i18n", package.seeall)
-require("ffluci.sys")
+module("luci.i18n", package.seeall)
+require("luci.sys")
 
 table   = {}
-i18ndir = ffluci.sys.libpath() .. "/i18n/"
+i18ndir = luci.sys.libpath() .. "/i18n/"
 
 -- Clears the translation table
 function clear()
@@ -49,7 +49,7 @@ end
 
 -- Same as load but autocompletes the filename with .LANG from config.lang
 function loadc(file)
-       return load(file .. "." .. require("ffluci.config").main.lang)
+       return load(file .. "." .. require("luci.config").main.lang)
 end
 
 -- Returns the i18n-value defined by "key" or if there is no such: "default"
index 7af43c7..ce52d0a 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Freifunk Lua Configuration Interface
+LuCI - Lua Configuration Interface
 
 Description:
 Main class
@@ -23,7 +23,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci", package.seeall)
+module("luci", package.seeall)
 
 __version__ = "0.5"
-__appname__ = "FFLuCI"
+__appname__ = "LuCI"
index 9328e33..30cc5a1 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Menu Builder
+LuCI - Menu Builder
 
 Description:
 Collects menu building information from controllers
@@ -23,21 +23,21 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci.menu", package.seeall)
+module("luci.menu", package.seeall)
 
-require("ffluci.fs")
-require("ffluci.util")
-require("ffluci.sys")
-require("ffluci.dispatcher")
+require("luci.fs")
+require("luci.util")
+require("luci.sys")
+require("luci.dispatcher")
 
 -- Default modelpath
-modelpattern = ffluci.sys.libpath() .. "/model/menu/*.lua"
+modelpattern = luci.sys.libpath() .. "/model/menu/*.lua"
 
 -- Menu definition extra scope
 scope = {
-       translate = function(...) return require("ffluci.i18n").translate(...) end,
-       loadtrans = function(...) return require("ffluci.i18n").loadc(...) end,
-       isfile    = ffluci.fs.isfile
+       translate = function(...) return require("luci.i18n").translate(...) end,
+       loadtrans = function(...) return require("luci.i18n").loadc(...) end,
+       isfile    = luci.fs.isfile
 }
 
 -- Returns the menu information
index 3b149fb..e95a262 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - IPKG wrapper library
+LuCI - IPKG wrapper library
 
 Description:
 Wrapper for the ipkg Package manager
@@ -25,9 +25,9 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci.model.ipkg", package.seeall)
-require("ffluci.sys")
-require("ffluci.util")
+module("luci.model.ipkg", package.seeall)
+require("luci.sys")
+require("luci.util")
 
 ipkg = "ipkg"
 
@@ -88,7 +88,7 @@ function _lookup(act, pkg)
                cmd = cmd .. " '" .. pkg:gsub("'", "") .. "'"
        end
        
-       return _parselist(ffluci.sys.exec(cmd .. " 2>/dev/null"))
+       return _parselist(luci.sys.exec(cmd .. " 2>/dev/null"))
 end
 
 -- Internal parser function
@@ -97,23 +97,23 @@ function _parselist(rawdata)
                error("IPKG: Invalid rawdata given")
        end
        
-       rawdata = ffluci.util.split(rawdata) 
+       rawdata = luci.util.split(rawdata) 
        local data = {}
        local c = {}
        local l = nil
        
        for k, line in pairs(rawdata) do
                if line:sub(1, 1) ~= " " then
-                       local split = ffluci.util.split(line, ":", 1)
+                       local split = luci.util.split(line, ":", 1)
                        local key = nil
                        local val = nil
                        
                        if split[1] then
-                               key = ffluci.util.trim(split[1])
+                               key = luci.util.trim(split[1])
                        end
                        
                        if split[2] then
-                               val = ffluci.util.trim(split[2])
+                               val = luci.util.trim(split[2])
                        end
                        
                        if key and val then
@@ -122,7 +122,7 @@ function _parselist(rawdata)
                                        data[val] = c
                                elseif key == "Status" then
                                        c.Status = {}
-                                       for i, j in pairs(ffluci.util.split(val, " ")) do
+                                       for i, j in pairs(luci.util.split(val, " ")) do
                                                c.Status[j] = true
                                        end
                                else
index ca5b232..39354be 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - UCI mpdel
+LuCI - UCI mpdel
 
 Description:
 Generalized UCI model
@@ -23,16 +23,16 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci.model.uci", package.seeall)
+module("luci.model.uci", package.seeall)
 
 -- Default savedir
 savedir = "/tmp/.uci"
 
 -- Test whether to load libuci-Wrapper or /sbin/uci-Wrapper
 if pcall(require, "uci") then
-       Session = require("ffluci.model.uci.libuci").Session
+       Session = require("luci.model.uci.libuci").Session
 else
-       Session = require("ffluci.model.uci.wrapper").Session
+       Session = require("luci.model.uci.wrapper").Session
 end
 
 -- The default Session
index b160dc1..9a11125 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - UCI libuci wrapper
+LuCI - UCI libuci wrapper
 
 Description:
 Wrapper for the libuci Lua bindings
@@ -24,19 +24,19 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.model.uci.libuci", package.seeall)
+module("luci.model.uci.libuci", package.seeall)
 
 require("uci")
-require("ffluci.util")
-require("ffluci.sys")
+require("luci.util")
+require("luci.sys")
 
 -- Session class
-Session = ffluci.util.class()
+Session = luci.util.class()
 
 -- Session constructor
 function Session.__init__(self, savedir)
        self.ucicmd  = savedir and "uci -P " .. savedir or "uci"
-       self.savedir = savedir or ffluci.model.uci.savedir
+       self.savedir = savedir or luci.model.uci.savedir
 end
 
 function Session.add(self, config, section_type)
@@ -152,7 +152,7 @@ end
 
 
 function Session._uci(self, cmd)
-       local res = ffluci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
+       local res = luci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
        
        if res:len() == 0 then
                return nil
@@ -162,7 +162,7 @@ function Session._uci(self, cmd)
 end
 
 function Session._uci2(self, cmd)
-       local res = ffluci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
+       local res = luci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
        
        if res:len() > 0 then
                return false, res
index 3aa3b5f..e063b27 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - UCI wrapper library
+LuCI - UCI wrapper library
 
 Description:
 Wrapper for the /sbin/uci application, syntax of implemented functions
@@ -27,13 +27,13 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.model.uci.wrapper", package.seeall)
+module("luci.model.uci.wrapper", package.seeall)
 
-require("ffluci.util")
-require("ffluci.sys")
+require("luci.util")
+require("luci.sys")
 
 -- Session class
-Session = ffluci.util.class()
+Session = luci.util.class()
 
 -- Session constructor
 function Session.__init__(self, savedir)
@@ -104,7 +104,7 @@ Session.t_set = Session.set
 
 
 function Session._uci(self, cmd)
-       local res = ffluci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
+       local res = luci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
        
        if res:len() == 0 then
                return nil
@@ -114,7 +114,7 @@ function Session._uci(self, cmd)
 end
 
 function Session._uci2(self, cmd)
-       local res = ffluci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
+       local res = luci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
        
        if res:len() > 0 then
                return false, res
@@ -124,7 +124,7 @@ function Session._uci2(self, cmd)
 end
 
 function Session._uci3(self, cmd)
-       local res = ffluci.sys.execl(self.ucicmd .. " 2>&1 " .. cmd)
+       local res = luci.sys.execl(self.ucicmd .. " 2>&1 " .. cmd)
        if res[1] and res[1]:sub(1, self.ucicmd:len()+1) == self.ucicmd..":" then
                return nil, res[1]
        end
index debd8e9..d174c8e 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - System library
+LuCI - System library
 
 Description:
 Utilities for interaction with the Linux system
@@ -24,10 +24,10 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.sys", package.seeall)
+module("luci.sys", package.seeall)
 require("posix")
-require("ffluci.bits")
-require("ffluci.util")
+require("luci.bits")
+require("luci.util")
 
 -- Returns whether a system is bigendian
 function bigendian()
@@ -61,9 +61,9 @@ function execl(command)
        return data
 end
 
--- Uses "ffluci-flash" to flash a new image file to the system
+-- Uses "luci-flash" to flash a new image file to the system
 function flash(image, kpattern)
-       local cmd = "ffluci-flash "
+       local cmd = "luci-flash "
        if kpattern then
                cmd = cmd .. "-k '" .. kpattern:gsub("'", "") .. "' "
        end
@@ -84,7 +84,7 @@ end
 
 -- Returns the FFLuci-Basedir
 function libpath()
-       return ffluci.fs.dirname(require("ffluci.debug").__file__)
+       return luci.fs.dirname(require("luci.debug").__file__)
 end
 
 -- Returns the load average
@@ -106,18 +106,18 @@ function sysinfo()
        local c4 = "cat /proc/cpuinfo|grep cpu\\ model|cut -d: -f2 2>/dev/null"
        local c5 = "cat /proc/meminfo|grep MemTotal|cut -d: -f2 2>/dev/null"
        
-       local s = ffluci.util.trim(exec(c1))
+       local s = luci.util.trim(exec(c1))
        local m = ""
        local r = ""
        
        if s == "" then
-               s = ffluci.util.trim(exec(c2))
-               m = ffluci.util.trim(exec(c3))
+               s = luci.util.trim(exec(c2))
+               m = luci.util.trim(exec(c3))
        else
-               m = ffluci.util.trim(exec(c4))
+               m = luci.util.trim(exec(c4))
        end
        
-       r = ffluci.util.trim(exec(c5))
+       r = luci.util.trim(exec(c5))
        
        return s, m, r
 end
@@ -147,7 +147,7 @@ function net.defaultroute()
        local routes = net.routes()
        local route = nil
        
-       for i, r in pairs(ffluci.sys.net.routes()) do
+       for i, r in pairs(luci.sys.net.routes()) do
                if r.Destination == "00000000" and (not route or route.Metric > r.Metric) then
                        route = r
                end
@@ -186,7 +186,7 @@ function net.mask4prefix(mask)
                return nil
        end
        
-       return #ffluci.util.split(bin, "1")-1
+       return #luci.util.split(bin, "1")-1
 end
 
 -- Returns the kernel routing table
@@ -202,7 +202,7 @@ function net.hexip4(hex, be)
        
        be = be or bigendian()
        
-       local hexdec = ffluci.bits.Hex2Dec
+       local hexdec = luci.bits.Hex2Dec
        
        local ip = ""
        if be then
@@ -222,12 +222,12 @@ end
 
 -- Returns the binary IP to a given IP
 function net.ip4bin(ip)
-       local parts = ffluci.util.split(ip, '.')
+       local parts = luci.util.split(ip, '.')
        if #parts ~= 4 then
                return nil
        end
        
-       local decbin = ffluci.bits.Dec2Bin
+       local decbin = luci.bits.Dec2Bin
        
        local bin = ""
        bin = bin .. decbin(parts[1], 8)
@@ -283,7 +283,7 @@ function wifi.getiwconfig()
        local cnt = exec("/usr/sbin/iwconfig 2>/dev/null")
        local iwc = {}
        
-       for i, l in pairs(ffluci.util.split(ffluci.util.trim(cnt), "\n\n")) do
+       for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n\n")) do
                local k = l:match("^(.-) ")
                l = l:gsub("^(.-) +", "", 1)
                if k then
@@ -298,15 +298,15 @@ function wifi.iwscan()
        local cnt = exec("iwlist scan 2>/dev/null")
        local iws = {}
        
-       for i, l in pairs(ffluci.util.split(ffluci.util.trim(cnt), "\n\n")) do
+       for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n\n")) do
                local k = l:match("^(.-) ")
                l = l:gsub("^[^\n]+", "", 1)
-               l = ffluci.util.trim(l)
+               l = luci.util.trim(l)
                if k then
                        iws[k] = {}
-                       for j, c in pairs(ffluci.util.split(l, "\n          Cell")) do
+                       for j, c in pairs(luci.util.split(l, "\n          Cell")) do
                                c = c:gsub("^(.-)- ", "", 1)
-                               c = ffluci.util.split(c, "\n", 7)
+                               c = luci.util.split(c, "\n", 7)
                                c = table.concat(c, "\n", 1)
                                table.insert(iws[k], _parse_mixed_record(c))
                        end
@@ -323,8 +323,8 @@ function _parse_delimited_table(iter, delimiter)
        delimiter = delimiter or "%s+"
        
        local data  = {}
-       local trim  = ffluci.util.trim
-       local split = ffluci.util.split
+       local trim  = luci.util.trim
+       local split = luci.util.split
        
        local keys = split(trim(iter()), delimiter, nil, true)
        for i, j in pairs(keys) do
@@ -350,8 +350,8 @@ end
 function _parse_mixed_record(cnt)
        local data = {}
        
-       for i, l in pairs(ffluci.util.split(ffluci.util.trim(cnt), "\n")) do
-       for j, f in pairs(ffluci.util.split(ffluci.util.trim(l), "  ")) do
+       for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n")) do
+       for j, f in pairs(luci.util.split(luci.util.trim(l), "  ")) do
                local k, x, v = f:match('([^%s][^:=]+) *([:=]*) *"*([^\n"]*)"*')
 
             if k then
index 3e518d4..6450c30 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Iptables parser and query library
+LuCI - Iptables parser and query library
 
 Copyright 2008 Jo-Philipp Wich <freifunk@wwsnet.net>
 
@@ -19,12 +19,12 @@ $Id$
 
 ]]--
 
-module("ffluci.sys.iptparser", package.seeall)
-require("ffluci.sys")
-require("ffluci.util")
+module("luci.sys.iptparser", package.seeall)
+require("luci.sys")
+require("luci.util")
 
 
-IptParser = ffluci.util.class()
+IptParser = luci.util.class()
 
 --[[
 IptParser.__init__( ... )
@@ -77,7 +77,7 @@ Each rule table contains the following fields:
 
 Example:
 
-ip = ffluci.sys.iptparser.IptParser()
+ip = luci.sys.iptparser.IptParser()
 result = ip.find( {
        target="REJECT",
        protocol="tcp",
@@ -180,7 +180,7 @@ function IptParser._parse_rules( self )
 
        for i, tbl in ipairs({ "filter", "nat", "mangle" }) do
 
-               for i, rule in ipairs(ffluci.sys.execl("iptables -t " .. tbl .. " --line-numbers -nxvL")) do
+               for i, rule in ipairs(luci.sys.execl("iptables -t " .. tbl .. " --line-numbers -nxvL")) do
 
                        if rule:find( "Chain " ) == 1 then
                
@@ -189,7 +189,7 @@ function IptParser._parse_rules( self )
                        else
                                if rule:find("%d") == 1 then
 
-                                       local rule_parts   = ffluci.util.split( rule, "%s+", nil, true )
+                                       local rule_parts   = luci.util.split( rule, "%s+", nil, true )
                                        local rule_details = { }
 
                                        rule_details["table"]       = tbl
index a56b49d..7fc2958 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Template Parser
+LuCI - Template Parser
 
 Description:
 A template parser supporting includes, translations, Lua code blocks
@@ -23,14 +23,14 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 ]]--
-module("ffluci.template", package.seeall)
+module("luci.template", package.seeall)
 
-require("ffluci.config")
-require("ffluci.util")
-require("ffluci.fs")
-require("ffluci.http")
+require("luci.config")
+require("luci.util")
+require("luci.fs")
+require("luci.http")
 
-viewdir = ffluci.sys.libpath() .. "/view/"
+viewdir = luci.sys.libpath() .. "/view/"
 
 
 -- Compile modes:
@@ -50,12 +50,12 @@ compiler_enable_bytecode = false
 
 -- Define the namespace for template modules
 viewns = {
-       translate  = function(...) return require("ffluci.i18n").translate(...) end,
-       config     = function(...) return require("ffluci.model.uci").get(...) or "" end,
-       controller = ffluci.http.dispatcher(),
-       uploadctrl = ffluci.http.dispatcher_upload(),
-       media      = ffluci.config.main.mediaurlbase,
-       resource   = ffluci.config.main.resourcebase,
+       translate  = function(...) return require("luci.i18n").translate(...) end,
+       config     = function(...) return require("luci.model.uci").get(...) or "" end,
+       controller = luci.http.dispatcher(),
+       uploadctrl = luci.http.dispatcher_upload(),
+       media      = luci.config.main.mediaurlbase,
+       resource   = luci.config.main.resourcebase,
        write      = io.write,
        include    = function(name) Template(name):render(getfenv(2)) end,      
 }
@@ -70,15 +70,15 @@ function compile(template)
        
        -- As "expr" should be local, we have to assign it to the "expr_add" scope 
        local expr = {}
-       ffluci.util.extfenv(expr_add, "expr", expr)
+       luci.util.extfenv(expr_add, "expr", expr)
        
        -- Save all expressiosn to table "expr"
        template = template:gsub("<%%(.-)%%>", expr_add)
        
        local function sanitize(s)
-               s = ffluci.util.escape(s)
-               s = ffluci.util.escape(s, "'")
-               s = ffluci.util.escape(s, "\n")
+               s = luci.util.escape(s)
+               s = luci.util.escape(s, "'")
+               s = luci.util.escape(s, "\n")
                return s
        end
        
@@ -137,7 +137,7 @@ end
 
 
 -- Template class
-Template = ffluci.util.class()
+Template = luci.util.class()
 
 -- Shared template cache to store templates in to avoid unnecessary reloading
 Template.cache = {}
@@ -170,18 +170,18 @@ function Template.__init__(self, name)
        local err       
        
        if compiler_mode == "file" then
-               local tplmt = ffluci.fs.mtime(sourcefile)
-               local commt = ffluci.fs.mtime(compiledfile)
+               local tplmt = luci.fs.mtime(sourcefile)
+               local commt = luci.fs.mtime(compiledfile)
                                
                -- Build if there is no compiled file or if compiled file is outdated
                if ((commt == nil) and not (tplmt == nil))
                or (not (commt == nil) and not (tplmt == nil) and commt < tplmt) then
                        local source
-                       source, err = ffluci.fs.readfile(sourcefile)
+                       source, err = luci.fs.readfile(sourcefile)
                        
                        if source then
                                local compiled = compile(source)
-                               ffluci.fs.writefile(compiledfile, compiled)
+                               luci.fs.writefile(compiledfile, compiled)
                                self.template, err = loadstring(compiled)
                        end
                else
@@ -193,7 +193,7 @@ function Template.__init__(self, name)
                
        elseif compiler_mode == "memory" then
                local source
-               source, err = ffluci.fs.readfile(sourcefile)
+               source, err = luci.fs.readfile(sourcefile)
                if source then
                        self.template, err = loadstring(compile(source))
                end
@@ -217,9 +217,9 @@ function Template.render(self, scope)
        local oldfenv = getfenv(self.template)
        
        -- Put our predefined objects in the scope of the template
-       ffluci.util.resfenv(self.template)
-       ffluci.util.updfenv(self.template, scope)
-       ffluci.util.updfenv(self.template, self.viewns)
+       luci.util.resfenv(self.template)
+       luci.util.updfenv(self.template, scope)
+       luci.util.updfenv(self.template, self.viewns)
        
        -- Now finally render the thing
        self.template()
index c7dba31..0559fff 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Utility library
+LuCI - Utility library
 
 Description:
 Several common useful Lua functions
@@ -24,7 +24,7 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.util", package.seeall)
+module("luci.util", package.seeall)
 
 
 -- Lua simplified Python-style OO class support emulation
index 3b615d7..a66d28f 100644 (file)
@@ -1,5 +1,5 @@
 <%+header%>
-               <form method="post" action="<%=ffluci.http.env.REQUEST_URI%>">
+               <form method="post" action="<%=luci.http.env.REQUEST_URI%>">
                        <div>
                                <script type="text/javascript" src="<%=media%>/cbi.js"></script>
                                <input type="hidden" name="cbi.submit" value="1" />
index 97a1c42..bed66e5 100644 (file)
@@ -5,14 +5,14 @@ local v = self:valuelist(section)
 <% if self.widget == "select" then %>
                                                                <select multiple="multiple" name="cbid.<%=self.config.."."..section.."."..self.option%>[]"<% if self.size then %> size="<%=self.size%>"<% end %>>
 <%for i, key in pairs(self.keylist) do %>
-                                                                       <option<% if ffluci.util.contains(v, key) then %> selected="selected"<% end %> value="<%=key%>"><%=self.vallist[i]%></option>
+                                                                       <option<% if luci.util.contains(v, key) then %> selected="selected"<% end %> value="<%=key%>"><%=self.vallist[i]%></option>
 <% end %>
                                                                </select>
 <% elseif self.widget == "checkbox" then
        local c = 0;
        for i, key in pairs(self.keylist) do
        c = c + 1%>
-                                                               <%=self.vallist[i]%><input type="checkbox" name="cbid.<%=self.config.."."..section.."."..self.option%>[]"<% if ffluci.util.contains(v, key) then %> checked="checked"<% end %> value="<%=key%>" />
+                                                               <%=self.vallist[i]%><input type="checkbox" name="cbid.<%=self.config.."."..section.."."..self.option%>[]"<% if luci.util.contains(v, key) then %> checked="checked"<% end %> value="<%=key%>" />
 <% if c == self.size then c = 0 %><br />
 <% end end %>
 <% end %>
index 51ea176..60daee2 100644 (file)
@@ -1,5 +1,5 @@
 <%+header%>
 <h1>404 Not Found</h1>
 <p>Sorry, the object you requested was not found.</p>
-<tt>Unable to dispatch: <%=ffluci.http.env.PATH_INFO%></tt>
+<tt>Unable to dispatch: <%=luci.http.env.PATH_INFO%></tt>
 <%+footer%>
\ No newline at end of file
index f324408..c8506ac 100644 (file)
@@ -2,6 +2,6 @@
        <div class="clear"></div>
 </div></div>
 
-<div class="separator magenta bold"><a href="http://luci.freifunk-halle.net"><%=require("ffluci").__appname__ .. " " .. ffluci.__version__%> - Freifunk Lua Configuration Interface</a></div>
+<div class="separator magenta bold"><a href="http://luci.freifunk-halle.net"><%=require("luci").__appname__ .. " " .. luci.__version__%> - Lua Configuration Interface</a></div>
 </body>
 </html>
\ No newline at end of file
index 99b4380..126eb36 100644 (file)
@@ -1,12 +1,12 @@
 <%
-require("ffluci.sys")
-local load1, load5, load15 = ffluci.sys.loadavg()
+require("luci.sys")
+local load1, load5, load15 = luci.sys.loadavg()
 
-local request  = require("ffluci.dispatcher").request
+local request  = require("luci.dispatcher").request
 local category = request[1]
-local tree     = ffluci.dispatcher.node()
-local cattree  = category and ffluci.dispatcher.node(category)
-local node     = ffluci.dispatcher.dispatched 
+local tree     = luci.dispatcher.node()
+local cattree  = category and luci.dispatcher.node(category)
+local node     = luci.dispatcher.dispatched 
 
 local c = tree
 for i,r in ipairs(request) do
@@ -16,9 +16,9 @@ for i,r in ipairs(request) do
        end
 end
 
-require("ffluci.i18n").loadc("default")
+require("luci.i18n").loadc("default")
 
-require("ffluci.http").prepare_content("text/html")
+require("luci.http").prepare_content("text/html")
 %><?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
@@ -27,7 +27,7 @@ require("ffluci.http").prepare_content("text/html")
        <% if node and node.css then %><link rel="stylesheet" type="text/css" href="<%=resource%>/<%=node.css%>" /><% end %>
        <meta http-equiv="content-type" content="text/xhtml+xml; charset=utf-8" />
        <meta http-equiv="content-script-type" content="text/javascript" />
-       <title>FFLuCI - Freifunk Lua Configuration Interface</title>
+       <title>LuCI - Lua Configuration Interface</title>
 </head>
 <body>
 <div id="header">
@@ -36,7 +36,7 @@ require("ffluci.http").prepare_content("text/html")
        OpenWRT Kamikaze<br />
        Freifunk Firmware 2.0-dev<br />
        <%:load Last%>: <%=load1%> <%=load5%> <%=load15%><br />
-       <%:hostname Hostname%>: <%=ffluci.sys.hostname()%> 
+       <%:hostname Hostname%>: <%=luci.sys.hostname()%> 
        </div>
        <div>
                <span class="headertitle"><%~luci.main.title%></span><br />
@@ -115,10 +115,10 @@ end
                </div>
                <%
                        if "admin" == request[1] then
-                               require("ffluci.model.uci") 
-                               local ucic = ffluci.model.uci.changes()
+                               require("luci.model.uci") 
+                               local ucic = luci.model.uci.changes()
                                if ucic then
-                                       ucic = #ffluci.util.split(ucic)
+                                       ucic = #luci.util.split(ucic)
                                end
                %>
                <div><%:config Konfiguration%>
index 89545f1..11123c9 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.admin.index", package.seeall)
+module("luci.controller.admin.index", package.seeall)
 
 function index()
        local root = node()
index 8f11c28..397f2e4 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.admin.network", package.seeall)
+module("luci.controller.admin.network", package.seeall)
 
 function index()
        local page  = node("admin", "network")
@@ -31,7 +31,7 @@ function index()
        page.title  = "Statische Routen"
        page.order  = 50
        
-       if ffluci.fs.isfile("/etc/config/qos") then
+       if luci.fs.isfile("/etc/config/qos") then
                local page  = node("admin", "network", "qos")
                page.target = cbi("admin_network/qos")
                page.title  = "Quality of Service"
index cb7c170..4dcf837 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.admin.services", package.seeall)
+module("luci.controller.admin.services", package.seeall)
 
 function index()
        local page  = node("admin", "services")
@@ -21,7 +21,7 @@ function index()
        page.title  = "Dnsmasq"
        page.order  = 30
        
-       if ffluci.fs.isfile("/etc/config/olsr") then
+       if luci.fs.isfile("/etc/config/olsr") then
                local page  = node("admin", "services", "olsr")
                page.target = cbi("admin_services/olsrd")
                page.title  = "OLSR"
index 1c26257..02c3af4 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.admin.status", package.seeall)
+module("luci.controller.admin.status", package.seeall)
 
 function index()
        local page  = node("admin", "status")
@@ -12,6 +12,6 @@ function index()
 end
 
 function action_syslog()
-       local syslog = ffluci.sys.syslog()
-       ffluci.template.render("admin_status/syslog", {syslog=syslog})
+       local syslog = luci.sys.syslog()
+       luci.template.render("admin_status/syslog", {syslog=syslog})
 end
\ No newline at end of file
index fb108c9..e44e787 100644 (file)
@@ -1,11 +1,11 @@
-module("ffluci.controller.admin.system", package.seeall)
+module("luci.controller.admin.system", package.seeall)
 
-require("ffluci.sys")
-require("ffluci.http")
-require("ffluci.util")
-require("ffluci.fs")
-require("ffluci.model.ipkg")
-require("ffluci.model.uci")
+require("luci.sys")
+require("luci.http")
+require("luci.util")
+require("luci.fs")
+require("luci.model.ipkg")
+require("luci.model.uci")
 
 function index()
        local page  = node("admin", "system")
@@ -54,63 +54,63 @@ function index()
 end
 
 function action_editor()
-       local file = ffluci.http.formvalue("file", "")
-       local data = ffluci.http.formvalue("data")
+       local file = luci.http.formvalue("file", "")
+       local data = luci.http.formvalue("data")
        local err  = nil
        local msg  = nil
        local stat = true
        
        if file and data then
-               stat, err = ffluci.fs.writefile(file, data)
+               stat, err = luci.fs.writefile(file, data)
        end
        
        if not stat then
-               err = ffluci.util.split(err, " ")
+               err = luci.util.split(err, " ")
                table.remove(err, 1)
                msg = table.concat(err, " ")
        end
        
-       local cnt, err = ffluci.fs.readfile(file)
+       local cnt, err = luci.fs.readfile(file)
        if cnt then
-               cnt = ffluci.util.pcdata(cnt)
+               cnt = luci.util.pcdata(cnt)
        end
-       ffluci.template.render("admin_system/editor", {fn=file, cnt=cnt, msg=msg})      
+       luci.template.render("admin_system/editor", {fn=file, cnt=cnt, msg=msg})        
 end
 
 function action_ipkg()
        local file = "/etc/ipkg.conf"
-       local data = ffluci.http.formvalue("data")
+       local data = luci.http.formvalue("data")
        local stat = nil
        local err  = nil
        
        if data then
-               stat, err = ffluci.fs.writefile(file, data)
+               stat, err = luci.fs.writefile(file, data)
        end     
        
-       local cnt  = ffluci.fs.readfile(file)   
+       local cnt  = luci.fs.readfile(file)     
        if cnt then
-               cnt = ffluci.util.pcdata(cnt)
+               cnt = luci.util.pcdata(cnt)
        end
        
-       ffluci.template.render("admin_system/ipkg", {cnt=cnt, msg=err}) 
+       luci.template.render("admin_system/ipkg", {cnt=cnt, msg=err})   
 end
 
 function action_packages()
-       local ipkg = ffluci.model.ipkg
+       local ipkg = luci.model.ipkg
        local void = nil
-       local submit = ffluci.http.formvalue("submit")
+       local submit = luci.http.formvalue("submit")
        
        
        -- Search query
-       local query = ffluci.http.formvalue("query")
+       local query = luci.http.formvalue("query")
        query = (query ~= '') and query or nil
        
        
        -- Packets to be installed
-       local install = submit and ffluci.http.formvaluetable("install")
+       local install = submit and luci.http.formvaluetable("install")
        
        -- Install from URL
-       local url = ffluci.http.formvalue("url")
+       local url = luci.http.formvalue("url")
        if url and url ~= '' and submit then
                if not install then
                        install = {}
@@ -127,7 +127,7 @@ function action_packages()
        
        
        -- Remove packets
-       local remove = submit and ffluci.http.formvaluetable("remove")
+       local remove = submit and luci.http.formvaluetable("remove")
        if remove then  
                for k, v in pairs(remove) do
                        void, remove[k] = ipkg.remove(k)
@@ -136,21 +136,21 @@ function action_packages()
        
        
        -- Update all packets
-       local update = ffluci.http.formvalue("update")
+       local update = luci.http.formvalue("update")
        if update then
                void, update = ipkg.update()
        end
        
        
        -- Upgrade all packets
-       local upgrade = ffluci.http.formvalue("upgrade")
+       local upgrade = luci.http.formvalue("upgrade")
        if upgrade then
                void, upgrade = ipkg.upgrade()
        end
        
        
        -- Package info
-       local info = ffluci.model.ipkg.info(query)
+       local info = luci.model.ipkg.info(query)
        info = info or {}
        local pkgs = {}
        
@@ -174,63 +174,63 @@ function action_packages()
                table.insert(pkgs, x+1, v)
        end 
        
-       ffluci.template.render("admin_system/packages", {pkgs=pkgs, query=query,
+       luci.template.render("admin_system/packages", {pkgs=pkgs, query=query,
         install=install, remove=remove, update=update, upgrade=upgrade})       
 end
 
 function action_passwd()
-       local p1 = ffluci.http.formvalue("pwd1")
-       local p2 = ffluci.http.formvalue("pwd2")
+       local p1 = luci.http.formvalue("pwd1")
+       local p2 = luci.http.formvalue("pwd2")
        local stat = nil
        
        if p1 or p2 then
                if p1 == p2 then
-                       stat = ffluci.sys.user.setpasswd("root", p1)
+                       stat = luci.sys.user.setpasswd("root", p1)
                else
                        stat = 10
                end
        end
        
-       ffluci.template.render("admin_system/passwd", {stat=stat})
+       luci.template.render("admin_system/passwd", {stat=stat})
 end
 
 function action_reboot()
-       local reboot = ffluci.http.formvalue("reboot")
-       ffluci.template.render("admin_system/reboot", {reboot=reboot})
+       local reboot = luci.http.formvalue("reboot")
+       luci.template.render("admin_system/reboot", {reboot=reboot})
        if reboot then
-               ffluci.sys.reboot()
+               luci.sys.reboot()
        end
 end
 
 function action_sshkeys()
        local file = "/etc/dropbear/authorized_keys"
-       local data = ffluci.http.formvalue("data")
+       local data = luci.http.formvalue("data")
        local stat = nil
        local err  = nil
        
        if data then
-               stat, err = ffluci.fs.writefile(file, data)
+               stat, err = luci.fs.writefile(file, data)
        end     
        
-       local cnt  = ffluci.fs.readfile(file)   
+       local cnt  = luci.fs.readfile(file)     
        if cnt then
-               cnt = ffluci.util.pcdata(cnt)
+               cnt = luci.util.pcdata(cnt)
        end
        
-       ffluci.template.render("admin_system/sshkeys", {cnt=cnt, msg=err})      
+       luci.template.render("admin_system/sshkeys", {cnt=cnt, msg=err})        
 end
 
 function action_upgrade()
        local ret  = nil
-       local plat = ffluci.fs.mtime("/lib/upgrade/platform.sh")
+       local plat = luci.fs.mtime("/lib/upgrade/platform.sh")
        
-       local image   = ffluci.http.upload("image")
-       local keepcfg = ffluci.http.formvalue("keepcfg")
+       local image   = luci.http.upload("image")
+       local keepcfg = luci.http.formvalue("keepcfg")
        
        if plat and image then
                local kpattern = nil
                if keepcfg then
-                       local files = ffluci.model.uci.sections("luci").flash_keep
+                       local files = luci.model.uci.sections("luci").flash_keep
                        if files.luci and files.luci.flash_keep then
                                kpattern = ""
                                for k,v in pairs(files.luci.flash_keep) do
@@ -238,8 +238,8 @@ function action_upgrade()
                                end
                        end
                end
-               ret = ffluci.sys.flash(image, kpattern)
+               ret = luci.sys.flash(image, kpattern)
        end
        
-       ffluci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret})
+       luci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret})
 end
\ No newline at end of file
index 7443a16..ca1440b 100644 (file)
@@ -1,6 +1,6 @@
-module("ffluci.controller.admin.uci", package.seeall)
-require("ffluci.util")
-require("ffluci.sys")
+module("luci.controller.admin.uci", package.seeall)
+require("luci.util")
+require("luci.sys")
 
 function index()
        node("admin", "uci", "changes").target = template("admin_uci/changes")
@@ -10,7 +10,7 @@ end
 
 -- This function has a higher priority than the admin_uci/apply template
 function action_apply()
-       local changes = ffluci.model.uci.changes()
+       local changes = luci.model.uci.changes()
        local output  = ""
        
        if changes then
@@ -18,39 +18,39 @@ function action_apply()
                local run = {}
                
                -- Collect files to be applied and commit changes
-               for i, line in ipairs(ffluci.util.split(changes)) do
+               for i, line in ipairs(luci.util.split(changes)) do
                        local r = line:match("^-?([^.]+)")
                        if r then
                                com[r] = true
                                
-                               if ffluci.config.uci_oncommit and ffluci.config.uci_oncommit[r] then
-                                       run[ffluci.config.uci_oncommit[r]] = true
+                               if luci.config.uci_oncommit and luci.config.uci_oncommit[r] then
+                                       run[luci.config.uci_oncommit[r]] = true
                                end
                        end
                end
                
                -- Apply
                for config, i in pairs(com) do
-                       ffluci.model.uci.commit(config)
+                       luci.model.uci.commit(config)
                end 
                
                -- Search for post-commit commands
                for cmd, i in pairs(run) do
-                       output = output .. cmd .. ":" .. ffluci.sys.exec(cmd) .. "\n"
+                       output = output .. cmd .. ":" .. luci.sys.exec(cmd) .. "\n"
                end
        end
        
-       ffluci.template.render("admin_uci/apply", {changes=changes, output=output})
+       luci.template.render("admin_uci/apply", {changes=changes, output=output})
 end
 
 
 function action_revert()
-       local changes = ffluci.model.uci.changes()
+       local changes = luci.model.uci.changes()
        if changes then
                local revert = {}
                
                -- Collect files to be reverted
-               for i, line in ipairs(ffluci.util.split(changes)) do
+               for i, line in ipairs(luci.util.split(changes)) do
                        local r = line:match("^-?([^.]+)")
                        if r then
                                revert[r] = true
@@ -59,9 +59,9 @@ function action_revert()
                
                -- Revert them
                for k, v in pairs(revert) do
-                       ffluci.model.uci.revert(k)
+                       luci.model.uci.revert(k)
                end
        end
        
-       ffluci.template.render("admin_uci/revert", {changes=changes})
+       luci.template.render("admin_uci/revert", {changes=changes})
 end
\ No newline at end of file
index 922366c..0da6b79 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.admin.wifi", package.seeall)
+module("luci.controller.admin.wifi", package.seeall)
 
 function index()
        local page  = node("admin", "wifi")
index e146644..0831b59 100644 (file)
@@ -1,20 +1,20 @@
 luci = "User Interface"
 
 hello = "Hello!"
-admin1 = "This is the administration area of FFLuCI."
-admin2 = "FFLuCI is a free, flexible, and user friendly graphical interface for configuring OpenWRT Kamikaze."
+admin1 = "This is the administration area of LuCI."
+admin2 = "LuCI is a free, flexible, and user friendly graphical interface for configuring OpenWRT Kamikaze."
 admin3 = "On the following pages you can adjust all important settings of your router."
 admin4 = "You will find a navigation leading to the different configuration pages on the left side."
 admin5 = [[As we are always want to improve this interface we are looking forward
 to your feedback and suggestions.]]
 admin6 = "And now have fun with your router!"
-team   = "The FFLuCI Team"
+team   = "The LuCI Team"
 
-luci1 = "Here you can customize the settings and the functionality of FFLuCI."
+luci1 = "Here you can customize the settings and the functionality of LuCI."
 language = "Language"
 general = "General"
 ucicommit = "Post-commit actions"
 ucicommit1 = [[These commands will be executed automatically when a given UCI configuration is committed allowing
 changes to be applied instantly.]]
 keepflash = "Files to be kept when flashing a new firmware"
-keepflash1 = "When flashing a new firmware with FFLuCI these files will be added to the new firmware installation." 
\ No newline at end of file
+keepflash1 = "When flashing a new firmware with LuCI these files will be added to the new firmware installation." 
\ No newline at end of file
index e541d4e..bb6bc18 100644 (file)
@@ -1,19 +1,19 @@
 -- ToDo: Translate
-require("ffluci.config")
+require("luci.config")
 m = Map("luci", translate("luci", "Oberfläche"), translate("luci1", 
  "Hier können Eigenschaften und die Funktionalität der Oberfläche angepasst werden."))
 
 c = m:section(NamedSection, "main", "core", translate("general", "Allgemein"))
 
 l = c:option(ListValue, "lang", translate("language", "Sprache"))
-for k, v in pairs(ffluci.config.languages) do
+for k, v in pairs(luci.config.languages) do
        if k:sub(1, 1) ~= "." then
                l:value(k, v)
        end
 end
 
 t = c:option(ListValue, "mediaurlbase", translate("design", "Design"))
-for k, v in pairs(ffluci.config.themes) do
+for k, v in pairs(luci.config.themes) do
        if k:sub(1, 1) ~= "." then
                t:value(v, k)
        end
index caac277..63ef0aa 100644 (file)
@@ -1,6 +1,6 @@
 -- ToDo: Translate, Add descriptions and help texts
-require("ffluci.model.uci")
-require("ffluci.sys")
+require("luci.model.uci")
+require("luci.sys")
 
 m = Map("dhcp", "DHCP", [[Mit Hilfe von DHCP können Netzteilnehmer automatisch
 ihre Netzwerkkonfiguration (IP-Adresse, Netzmaske, DNS-Server, DHCP, ...) beziehen.]])
@@ -10,7 +10,7 @@ s.addremove = true
 s.anonymous = true
 
 iface = s:option(ListValue, "interface", "Schnittstelle")
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then
                iface:value(k)
                s:depends("interface", k) -- Only change sections with existing interfaces
@@ -33,7 +33,7 @@ s:option(Value, "netmask", "Netzmaske").optional = true
 
 s:option(Flag, "force", "Start erzwingen").optional = true
 
-for i, line in pairs(ffluci.sys.execl("dnsmasq --help dhcp")) do
+for i, line in pairs(luci.sys.execl("dnsmasq --help dhcp")) do
        k, v = line:match("([^ ]+) +([^ ]+)")
        s:option(Value, "dhcp"..k, v).optional = true
 end
index ed3838c..a2a27eb 100644 (file)
@@ -9,7 +9,7 @@ s.anonymous = true
 s.template  = "cbi/tblsection"
 
 iface = s:option(ListValue, "interface", "Schnittstelle")
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then
                iface:value(k)
        end
index 8431a81..a1a1978 100644 (file)
@@ -1,5 +1,5 @@
 -- ToDo: Autodetect things, Translate, Add descriptions
-require("ffluci.fs")
+require("luci.fs")
 
 m = Map("olsr", "OLSR", [[OLSR ist ein flexibles Routingprotokoll, 
 dass den Aufbau von mobilen Ad-Hoc Netzen unterstützt.]])
@@ -51,7 +51,7 @@ i.dynamic = true
 
 network = i:option(ListValue, "Interface", "Netzwerkschnittstellen")
 network:value("")
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then
                network:value(k)
        end
@@ -80,7 +80,7 @@ p.dynamic = true
 
 lib = p:option(ListValue, "Library", "Bibliothek")
 lib:value("")
-for k, v in pairs(ffluci.fs.dir("/usr/lib")) do
+for k, v in pairs(luci.fs.dir("/usr/lib")) do
        if v:sub(1, 6) == "olsrd_" then
                lib:value(v)
        end
index b612dd6..2931a6e 100644 (file)
@@ -15,9 +15,9 @@ t:value("atheros")
 t:value("mac80211")
 t:value("prism2")
 --[[
-require("ffluci.sys")
+require("luci.sys")
 local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
-for driver in ffluci.sys.execl(c)[1]:gmatch("[^ ]+") do
+for driver in luci.sys.execl(c)[1]:gmatch("[^ ]+") do
        t:value(driver)
 end
 ]]--
index 4a7ad12..a5be6f5 100644 (file)
@@ -11,7 +11,7 @@ s.anonymous = true
 s:option(Value, "ssid", "Netzkennung (ESSID)").maxlength = 32
 
 device = s:option(ListValue, "device", "Gerät")
-local d = ffluci.model.uci.sections("wireless")
+local d = luci.model.uci.sections("wireless")
 if d then
        for k, v in pairs(d) do
                if v[".type"] == "wifi-device" then
@@ -22,7 +22,7 @@ end
 
 network = s:option(ListValue, "network", "Netzwerk", "WLAN-Netz zu Netzwerk hinzufügen")
 network:value("")
-for k, v in pairs(ffluci.model.uci.sections("network")) do
+for k, v in pairs(luci.model.uci.sections("network")) do
        if v[".type"] == "interface" and k ~= "loopback" then
                network:value(k)
        end
index 27cdade..2e5c7c3 100644 (file)
@@ -1,11 +1,11 @@
 <%+header%>
 <h1><%:hello Hallo!%></h1>
-<p><%:admin1 Dies ist der Administrationsbereich von FFLuCI.%></p>
-<p><%:admin2 FFLuCI ist eine freie, flexible und benutzerfreundliche grafische Oberfläche zur Konfiguration von OpenWRT Kamikaze.%><br />
+<p><%:admin1 Dies ist der Administrationsbereich von LuCI.%></p>
+<p><%:admin2 LuCI ist eine freie, flexible und benutzerfreundliche grafische Oberfläche zur Konfiguration von OpenWRT Kamikaze.%><br />
 <%:admin3 Auf den folgenden Seiten können alle wichtigen Einstellungen des Routers vorgenommen werden.%></p>
 <p><%:admin4 Auf der linken Seite befindet sich eine Navigation, die zu den einzelnen Konfigurationsseiten führt.%></p>
 <p><%:admin5 Wir sind natürlich stets darum bemüht, diese Oberfläche 
 noch besser und intuitiver zu Gestalten und freuen uns Ã¼ber jegliche Art von Feedback oder Verbesserungsvorschlägen.%></p>
 <p><%:admin6 Und nun wünschen wir viel Spaß mit dem Router!%></p>
-<p><em><strong><a href="http://luci.freifunk-halle.net"><%:team Das FFLuCI-Team%></a></strong></em></p> 
+<p><em><strong><a href="http://luci.freifunk-halle.net"><%:team Das LuCI-Team%></a></strong></em></p> 
 <%+footer%>
\ No newline at end of file
index 52efb45..43a48e3 100644 (file)
@@ -1,7 +1,7 @@
 <%+header%>
 <h1><%:config Konfiguration%></h1>
 <h2><%:changes Ã„nderungen%></h2>
-<code><%=ffluci.model.uci.changes()%></code>
+<code><%=luci.model.uci.changes()%></code>
 <form class="inline" method="get" action="<%=controller%>/admin/uci/apply">
        <input type="submit" value="<%:apply Anwenden%>" />
 </form>
index 3ff6144..104f6cd 100644 (file)
@@ -1,4 +1,4 @@
-module("ffluci.controller.freifunk.freifunk", package.seeall)
+module("luci.controller.freifunk.freifunk", package.seeall)
 
 function index()
        local page  = node()
@@ -52,17 +52,17 @@ end
 function action_status()
        local data = {}
        
-       data.s, data.m, data.r = ffluci.sys.sysinfo()
+       data.s, data.m, data.r = luci.sys.sysinfo()
        
-       data.wifi = ffluci.sys.wifi.getiwconfig()
+       data.wifi = luci.sys.wifi.getiwconfig()
        
        data.routes = {}
-       for i, r in pairs(ffluci.sys.net.routes()) do
+       for i, r in pairs(luci.sys.net.routes()) do
                if r.Destination == "00000000" then
                        table.insert(data.routes, r)
                end
        end
 
        
-       ffluci.template.render("public_status/index", data)
+       luci.template.render("public_status/index", data)
 end
\ No newline at end of file
index bc45898..aabab19 100644 (file)
@@ -1,28 +1,28 @@
-module("ffluci.controller.freifunk.luciinfo", package.seeall)
+module("luci.controller.freifunk.luciinfo", package.seeall)
 
 function index()
        node("freifunk", "luciinfo").target = action_index
 end
 
 function action_index()
-       local uci = ffluci.model.uci.StateSession()
+       local uci = luci.model.uci.StateSession()
 
-       ffluci.http.prepare_content("text/plain")
+       luci.http.prepare_content("text/plain")
        
        -- General
        print("luciinfo.api=1")
-       print("luciinfo.version=" .. tostring(require("ffluci").__version__))
+       print("luciinfo.version=" .. tostring(require("luci").__version__))
        
        -- Sysinfo
-       local s, m, r = ffluci.sys.sysinfo()
-       local dr = ffluci.sys.net.defaultroute()
-       dr = dr and ffluci.sys.net.hexip4(dr.Gateway) or ""
-       local l1, l5, l15 = ffluci.sys.loadavg()
+       local s, m, r = luci.sys.sysinfo()
+       local dr = luci.sys.net.defaultroute()
+       dr = dr and luci.sys.net.hexip4(dr.Gateway) or ""
+       local l1, l5, l15 = luci.sys.loadavg()
        
        print("sysinfo.system=" .. sanitize(s))
        print("sysinfo.cpu=" .. sanitize(m))
        print("sysinfo.ram=" .. sanitize(r))
-       print("sysinfo.hostname=" .. sanitize(ffluci.sys.hostname()))
+       print("sysinfo.hostname=" .. sanitize(luci.sys.hostname()))
        print("sysinfo.load1=" .. tostring(l1))
        print("sysinfo.load5=" .. tostring(l5))
        print("sysinfo.load15=" .. tostring(l15))
index 6031cd4..29858fc 100644 (file)
@@ -1,5 +1,5 @@
-module("ffluci.controller.freifunk.olsr", package.seeall)
-require("ffluci.sys")
+module("luci.controller.freifunk.olsr", package.seeall)
+require("luci.sys")
 
 function index()
        local page  = node("freifunk", "olsr")
@@ -32,7 +32,7 @@ function action_index()
        local data = fetch_txtinfo("links")
        
        if not data or not data.Links then
-               ffluci.template.render("freifunk-olsr/error_olsr")
+               luci.template.render("freifunk-olsr/error_olsr")
                return nil
        end
        
@@ -50,14 +50,14 @@ function action_index()
        
        table.sort(data.Links, compare)
        
-       ffluci.template.render("freifunk-olsr/index", {links=data.Links})
+       luci.template.render("freifunk-olsr/index", {links=data.Links})
 end
 
 function action_routes()
        local data = fetch_txtinfo("routes")
        
        if not data or not data.Routes then
-               ffluci.template.render("freifunk-olsr/error_olsr")
+               luci.template.render("freifunk-olsr/error_olsr")
                return nil
        end
        
@@ -75,14 +75,14 @@ function action_routes()
        
        table.sort(data.Routes, compare)
        
-       ffluci.template.render("freifunk-olsr/routes", {routes=data.Routes})
+       luci.template.render("freifunk-olsr/routes", {routes=data.Routes})
 end
 
 function action_topology()
        local data = fetch_txtinfo("topology")
        
        if not data or not data.Topology then
-               ffluci.template.render("freifunk-olsr/error_olsr")
+               luci.template.render("freifunk-olsr/error_olsr")
                return nil
        end
        
@@ -92,14 +92,14 @@ function action_topology()
        
        table.sort(data.Topology, compare)
        
-       ffluci.template.render("freifunk-olsr/topology", {routes=data.Topology})
+       luci.template.render("freifunk-olsr/topology", {routes=data.Topology})
 end
 
 function action_hna()
        local data = fetch_txtinfo("hna")
        
        if not data or not data.HNA then
-               ffluci.template.render("freifunk-olsr/error_olsr")
+               luci.template.render("freifunk-olsr/error_olsr")
                return nil
        end
        
@@ -109,14 +109,14 @@ function action_hna()
        
        table.sort(data.HNA, compare)
        
-       ffluci.template.render("freifunk-olsr/hna", {routes=data.HNA})
+       luci.template.render("freifunk-olsr/hna", {routes=data.HNA})
 end
 
 function action_mid()
        local data = fetch_txtinfo("mid")
        
        if not data or not data.MID then
-               ffluci.template.render("freifunk-olsr/error_olsr")
+               luci.template.render("freifunk-olsr/error_olsr")
                return nil
        end
        
@@ -126,14 +126,14 @@ function action_mid()
        
        table.sort(data.MID, compare)
        
-       ffluci.template.render("freifunk-olsr/mid", {mids=data.MID})
+       luci.template.render("freifunk-olsr/mid", {mids=data.MID})
 end
 
 
 -- Internal
 function fetch_txtinfo(otable)
        otable = otable or ""
-       local rawdata = ffluci.sys.httpget("http://127.0.0.1:2006/"..otable)
+       local rawdata = luci.sys.httpget("http://127.0.0.1:2006/"..otable)
        
        if #rawdata == 0 then
                return nil
@@ -141,18 +141,18 @@ function fetch_txtinfo(otable)
        
        local data = {}
        
-       local tables = ffluci.util.split(ffluci.util.trim(rawdata), "\n\n")
+       local tables = luci.util.split(luci.util.trim(rawdata), "\n\n")
        
 
        for i, tbl in ipairs(tables) do
-               local lines = ffluci.util.split(tbl, "\n")
+               local lines = luci.util.split(tbl, "\n")
                local name  = table.remove(lines, 1):sub(8)
-               local keys  = ffluci.util.split(table.remove(lines, 1), "\t")
+               local keys  = luci.util.split(table.remove(lines, 1), "\t")
                
                data[name] = {}
                
                for j, line in ipairs(lines) do
-                       local fields = ffluci.util.split(line, "\t")
+                       local fields = luci.util.split(line, "\t")
                        data[name][j] = {}
                        for k, key in pairs(keys) do
                                data[name][j][key] = fields[k] 
index 221dc89..c240916 100644 (file)
@@ -1,5 +1,5 @@
 <%+header%>
-<% local contact = ffluci.model.uci.sections("freifunk").contact %>
+<% local contact = luci.model.uci.sections("freifunk").contact %>
 <h1><%:contact Kontakt%></h1>
 <table cellspacing="0" cellpadding="6">
        <tr><th><%:nickname Pseudonym%>:</th><td><%=contact.nickname%></td></tr>
index 6c7fe85..c5ee17b 100644 (file)
@@ -1,8 +1,8 @@
 <%+header%>
-<% local ff = ffluci.model.uci.sections("freifunk") %>
+<% local ff = luci.model.uci.sections("freifunk") %>
 <h1><%:hellonet Hallo und willkommen im Netz von%> <%=ff.community.name%>!</h1>
 <p><%:public1 Wir sind eine Initiative zur Schaffung eines freien, offenen und unabhängigen Funknetzwerks auf WLAN-Basis.%><br />
-<%:public2 Dies ist der Zugangspunkt %><%=ffluci.sys.hostname()%>. <%:public3 Er wird betrieben von %>
+<%:public2 Dies ist der Zugangspunkt %><%=luci.sys.hostname()%>. <%:public3 Er wird betrieben von %>
 <a href="<%=controller%>/public/index/contact"><%=ff.contact.nickname%></a>.</p>
 <p><%:public4 Weitere Informationen zur globalen Freifunkinitiative findest du unter%> <a href="http://freifunk.net">Freifunk.net</a>.<br />
 <%:public5 Hast du Interesse an diesem Projekt, dann wende dich an deine lokale Gemeinschaft%> <a href="<%=ff.community.homepage%>"><%=ff.community.name%></a>.</p>
index 3ea120c..653baf9 100644 (file)
@@ -34,7 +34,7 @@
 <th><%:signal Signal%></th>
 <th><%:noise Rausch%></th>
 </tr>
-<%for k, v in pairs(ffluci.sys.wifi.getiwconfig()) do
+<%for k, v in pairs(luci.sys.wifi.getiwconfig()) do
 %>
 <tr>
 <td rowspan="2"><%=k%></td>
@@ -68,7 +68,7 @@
 for i, rt in pairs(routes) do
 %>
 <tr>
-<td><%=ffluci.sys.net.hexip4(rt.Gateway)%></th>
+<td><%=luci.sys.net.hexip4(rt.Gateway)%></th>
 <td><%=rt.Metric%></th>
 <td><%=rt.Iface%></th>
 </tr>
index c5acdb9..adba2d2 100644 (file)
@@ -15,7 +15,7 @@
 <th><%:signal Signal%></th>
 <th><%:noise Rausch%></th>
 </tr>
-<%for iface, cells in pairs(ffluci.sys.wifi.iwscan()) do
+<%for iface, cells in pairs(luci.sys.wifi.iwscan()) do
        for i, cell in ipairs(cells) do 
 %>
 <tr>
index 85b0221..382b829 100644 (file)
 <th><%:iface Schnittstelle%></th>
 </tr>
 <%
-local routes = ffluci.sys.net.routes()
+local routes = luci.sys.net.routes()
 
 for i, r in pairs(routes) do
 %>
 <tr>
-<td><%=ffluci.sys.net.hexip4(r.Destination)%></td>
-<td><%=ffluci.sys.net.hexip4(r.Mask)%></td>
-<td><%=ffluci.sys.net.hexip4(r.Gateway)%></td>
+<td><%=luci.sys.net.hexip4(r.Destination)%></td>
+<td><%=luci.sys.net.hexip4(r.Mask)%></td>
+<td><%=luci.sys.net.hexip4(r.Gateway)%></td>
 <td><%=r.Metric%></td>
 <td><%=r.Iface%></td>
 </tr>
diff --git a/themes/fledermaus/root/www/ffluci/media/cascade.css b/themes/fledermaus/root/www/ffluci/media/cascade.css
deleted file mode 100644 (file)
index 5920254..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-@charset "utf-8";
-
-body {
-       font-family: Verdana, Arial, sans-serif;
-       background-color: #aaaaaa;
-}
-
-h1 {
-       margin: 0%;
-       font-size: 1.4em;
-       font-weight: bold;
-       margin-bottom: 0.5em;
-}
-
-h2 {
-       margin: 0%;
-       font-size: 1.2em;
-       font-weight: bold;
-}
-
-h3 {
-       margin: 0%;
-}
-
-#header {
-       padding: 0.2em;
-       height: 4.5em;
-       background-color: #262626;
-}
-
-#columns {
-       border-left: 10.1em solid #262626;
-       border-right: 10.1em solid #262626;
-       display: block;
-       background-color: white;
-       padding: 0.1em;
-}
-
-#columnswrapper {
-       display: block;
-       margin-left: -10em;
-       margin-right: -10em;
-}
-
-#content {
-       margin-left: 14em;
-       margin-right: 14em;
-       display: block;
-       position: relative;
-       padding: 2px;
-       font-size: 0.8em;
-}
-
-.headerlogo {
-       height: 4em;
-       padding: 5px;
-}
-
-.headerlogo img {
-       height: 100%;
-}
-
-.headertitle {
-       font-size: 2.4em;
-       color: gray;
-       letter-spacing: 0.5em;
-       text-transform: lowercase;
-}
-
-.separator {
-       padding-left: 0.25em;
-       font-weight: bold;
-       font-size: 0.8em;
-       line-height: 1.4em;
-}
-
-.whitetext {
-       color: white;
-}
-
-.yellowtext {
-       color: #ffcb05;
-}
-
-.magentatext {
-       color: #dc0065;
-}
-
-.inheritcolor {
-       color: inherit;
-}
-
-.smalltext {
-       font-size: 0.8em;
-}
-
-.yellow {
-       background-color: #ffcb05;
-}
-
-.magenta {
-       background-color: #dc0065;
-}
-
-.nodeco {
-       text-decoration: none;
-}
-
-.redhover:hover {
-       color: red;
-}
-
-.bold {
-       font-weight: bold;
-}
-
-.sidebar {
-       position: relative;
-       padding: 0.25em;
-       color: gray;
-       width: 9em;
-       font-weight: bold;
-}
-
-.separator a, .sidebar a {
-       color: inherit;
-       text-decoration: inherit;
-}
-
-.separator a:hover, .sidebar a:hover {
-       color: red;
-}
-
-.sidebar div {
-       padding-bottom: 0.5em;
-}
-
-.sidebar ul {
-       font-size: 0.8em;
-       color: white;
-       list-style-type: none;
-       padding-left: 1em;
-       margin-top: 0%;
-}
-
-.table {
-       display: table;
-}
-
-.table-row {
-       display: table-row;
-}
-
-.table-cell {
-       display: table-cell;
-}
-
-.left {
-       float: left;
-       text-align: left;
-}
-
-.right {
-       float: right;
-       text-align: right;
-}
-
-.clear {
-       clear: both;
-}
-
-.hidden {
-       display: none;
-}
-
-.inline {
-       display: inline;
-}
-
-.code {
-       background: #f7f7f7;
-       border: 1px solid #d7d7d7;
-       margin: 1em 1.75em;
-       padding: 1em;
-}
-
-code {
-       display: block;
-       background: #f7f7f7;
-       border: 1px solid #d7d7d7;
-       margin: 1em 1.75em;
-       padding: 1em;
-       overflow: auto;
-       white-space: pre;
-}
-
-table th, table, td {
-       vertical-align: top;
-       text-align: left;
-       border: 1px solid gray;
-}
-
-.cbi-section {
-       margin-top: 1em;
-}
-
-.cbi-section-remove {
-       text-align: right;
-}
-
-.cbi-value {
-       display: table-row;
-}
-
-.cbi-value-title {
-       display: table-cell;
-       line-height: 1.75em;
-       font-weight: bold;
-       padding: 0.25em;
-}
-
-.cbi-value-field {
-       display: table-cell;
-       text-align: left;
-       padding: 0.25em;
-       line-height: 1.75em;
-}
-
-.cbi-value-field input, .cbi-value-field select,
-.cbi-optionals select, .cbi-optionals input,
-.cbi-section-remove input, .cbi-section-create input  {
-       font-size: 0.8em;
-       margin: 0%;
-}
-
-.cbi-section-descr {
-       padding-bottom: 1em;
-}
-
-.cbi-value-description {
-       display: inline;
-       font-style: italic;
-       font-size: 0.8em; 
-       padding: 0.25em;
-       margin-bottom: 0.5em;
-}
-
-.cbi-form-separator {
-       margin-top: 1em;
-}
-
-.cbi-section-node {
-       display: table;
-       padding: 0.25em;
-       background: #f7f7f7;
-       border: 1px solid #d7d7d7;
-}
-
-.cbi-section-row {
-       display: table-row;
-}
-
-.cbi-section-row-head {
-       display: table-cell;
-       font-weight: bold;
-       padding: 0.25em;
-}
-
-.cbi-section-row-descr {
-       display: table-cell;
-       padding: 0.25em;
-       font-size: 0.8em;
-}
-
-.cbi-section-node h3 {
-       margin-bottom: 0.5em;
-}
-
-.cbi-error {
-       color: red;
-       font-weight: bold;
-       font-size: 0.8em;
-       margin-bottom: 0.75em;
-}
-
-.cbi-optionals {
-       margin-top: 1em;
-       display: table-cell;
-}
-
-.cbi-optionals option {
-       font-size: 0.8em;
-}
-
-.error {
-       color: red;
-       font-weight: bold;
-}
-
-.ok {
-       color: green;
-       font-weight: bold;
-}
\ No newline at end of file
diff --git a/themes/fledermaus/root/www/ffluci/media/cbi.js b/themes/fledermaus/root/www/ffluci/media/cbi.js
deleted file mode 100644 (file)
index a3a47aa..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-var cbi_d = {};
-
-function cbi_d_add(field, target, value) {
-       if (!cbi_d[target]) {
-               cbi_d[target] = {};
-       }
-       if (!cbi_d[target][value]) {
-               cbi_d[target][value] = [];
-       }
-       cbi_d[target][value].push(field);
-}
-
-function cbi_d_update(target) {
-       if (!cbi_d[target]) {
-               return;
-       }
-       
-       for (var x in cbi_d[target]) {
-               for (var i=0; i<cbi_d[target][x].length; i++) { 
-                       var y = document.getElementById(cbi_d[target][x][i])    
-                       y.style.display = "none";
-               }
-       }
-       
-       var t = document.getElementById(target);
-       if (t && t.value && cbi_d[target][t.value]) {
-               for (var i=0; i<cbi_d[target][t.value].length; i++) {                   
-                       var y = document.getElementById(cbi_d[target][t.value][i])
-                       if (!y.value) { 
-                               y.style.display = "table-row";
-                       } else {
-                               y.style.display = "block";
-                       }
-               }
-       }
-}
-
-function cbi_d_init() {
-       for (var x in cbi_d) {
-               cbi_d_update(x);
-       }
-}
\ No newline at end of file
diff --git a/themes/fledermaus/root/www/ffluci/media/logo.png b/themes/fledermaus/root/www/ffluci/media/logo.png
deleted file mode 100644 (file)
index d4c5dd9..0000000
Binary files a/themes/fledermaus/root/www/ffluci/media/logo.png and /dev/null differ
diff --git a/themes/fledermaus/root/www/luci/media/cascade.css b/themes/fledermaus/root/www/luci/media/cascade.css
new file mode 100644 (file)
index 0000000..5920254
--- /dev/null
@@ -0,0 +1,303 @@
+@charset "utf-8";
+
+body {
+       font-family: Verdana, Arial, sans-serif;
+       background-color: #aaaaaa;
+}
+
+h1 {
+       margin: 0%;
+       font-size: 1.4em;
+       font-weight: bold;
+       margin-bottom: 0.5em;
+}
+
+h2 {
+       margin: 0%;
+       font-size: 1.2em;
+       font-weight: bold;
+}
+
+h3 {
+       margin: 0%;
+}
+
+#header {
+       padding: 0.2em;
+       height: 4.5em;
+       background-color: #262626;
+}
+
+#columns {
+       border-left: 10.1em solid #262626;
+       border-right: 10.1em solid #262626;
+       display: block;
+       background-color: white;
+       padding: 0.1em;
+}
+
+#columnswrapper {
+       display: block;
+       margin-left: -10em;
+       margin-right: -10em;
+}
+
+#content {
+       margin-left: 14em;
+       margin-right: 14em;
+       display: block;
+       position: relative;
+       padding: 2px;
+       font-size: 0.8em;
+}
+
+.headerlogo {
+       height: 4em;
+       padding: 5px;
+}
+
+.headerlogo img {
+       height: 100%;
+}
+
+.headertitle {
+       font-size: 2.4em;
+       color: gray;
+       letter-spacing: 0.5em;
+       text-transform: lowercase;
+}
+
+.separator {
+       padding-left: 0.25em;
+       font-weight: bold;
+       font-size: 0.8em;
+       line-height: 1.4em;
+}
+
+.whitetext {
+       color: white;
+}
+
+.yellowtext {
+       color: #ffcb05;
+}
+
+.magentatext {
+       color: #dc0065;
+}
+
+.inheritcolor {
+       color: inherit;
+}
+
+.smalltext {
+       font-size: 0.8em;
+}
+
+.yellow {
+       background-color: #ffcb05;
+}
+
+.magenta {
+       background-color: #dc0065;
+}
+
+.nodeco {
+       text-decoration: none;
+}
+
+.redhover:hover {
+       color: red;
+}
+
+.bold {
+       font-weight: bold;
+}
+
+.sidebar {
+       position: relative;
+       padding: 0.25em;
+       color: gray;
+       width: 9em;
+       font-weight: bold;
+}
+
+.separator a, .sidebar a {
+       color: inherit;
+       text-decoration: inherit;
+}
+
+.separator a:hover, .sidebar a:hover {
+       color: red;
+}
+
+.sidebar div {
+       padding-bottom: 0.5em;
+}
+
+.sidebar ul {
+       font-size: 0.8em;
+       color: white;
+       list-style-type: none;
+       padding-left: 1em;
+       margin-top: 0%;
+}
+
+.table {
+       display: table;
+}
+
+.table-row {
+       display: table-row;
+}
+
+.table-cell {
+       display: table-cell;
+}
+
+.left {
+       float: left;
+       text-align: left;
+}
+
+.right {
+       float: right;
+       text-align: right;
+}
+
+.clear {
+       clear: both;
+}
+
+.hidden {
+       display: none;
+}
+
+.inline {
+       display: inline;
+}
+
+.code {
+       background: #f7f7f7;
+       border: 1px solid #d7d7d7;
+       margin: 1em 1.75em;
+       padding: 1em;
+}
+
+code {
+       display: block;
+       background: #f7f7f7;
+       border: 1px solid #d7d7d7;
+       margin: 1em 1.75em;
+       padding: 1em;
+       overflow: auto;
+       white-space: pre;
+}
+
+table th, table, td {
+       vertical-align: top;
+       text-align: left;
+       border: 1px solid gray;
+}
+
+.cbi-section {
+       margin-top: 1em;
+}
+
+.cbi-section-remove {
+       text-align: right;
+}
+
+.cbi-value {
+       display: table-row;
+}
+
+.cbi-value-title {
+       display: table-cell;
+       line-height: 1.75em;
+       font-weight: bold;
+       padding: 0.25em;
+}
+
+.cbi-value-field {
+       display: table-cell;
+       text-align: left;
+       padding: 0.25em;
+       line-height: 1.75em;
+}
+
+.cbi-value-field input, .cbi-value-field select,
+.cbi-optionals select, .cbi-optionals input,
+.cbi-section-remove input, .cbi-section-create input  {
+       font-size: 0.8em;
+       margin: 0%;
+}
+
+.cbi-section-descr {
+       padding-bottom: 1em;
+}
+
+.cbi-value-description {
+       display: inline;
+       font-style: italic;
+       font-size: 0.8em; 
+       padding: 0.25em;
+       margin-bottom: 0.5em;
+}
+
+.cbi-form-separator {
+       margin-top: 1em;
+}
+
+.cbi-section-node {
+       display: table;
+       padding: 0.25em;
+       background: #f7f7f7;
+       border: 1px solid #d7d7d7;
+}
+
+.cbi-section-row {
+       display: table-row;
+}
+
+.cbi-section-row-head {
+       display: table-cell;
+       font-weight: bold;
+       padding: 0.25em;
+}
+
+.cbi-section-row-descr {
+       display: table-cell;
+       padding: 0.25em;
+       font-size: 0.8em;
+}
+
+.cbi-section-node h3 {
+       margin-bottom: 0.5em;
+}
+
+.cbi-error {
+       color: red;
+       font-weight: bold;
+       font-size: 0.8em;
+       margin-bottom: 0.75em;
+}
+
+.cbi-optionals {
+       margin-top: 1em;
+       display: table-cell;
+}
+
+.cbi-optionals option {
+       font-size: 0.8em;
+}
+
+.error {
+       color: red;
+       font-weight: bold;
+}
+
+.ok {
+       color: green;
+       font-weight: bold;
+}
\ No newline at end of file
diff --git a/themes/fledermaus/root/www/luci/media/cbi.js b/themes/fledermaus/root/www/luci/media/cbi.js
new file mode 100644 (file)
index 0000000..a3a47aa
--- /dev/null
@@ -0,0 +1,42 @@
+var cbi_d = {};
+
+function cbi_d_add(field, target, value) {
+       if (!cbi_d[target]) {
+               cbi_d[target] = {};
+       }
+       if (!cbi_d[target][value]) {
+               cbi_d[target][value] = [];
+       }
+       cbi_d[target][value].push(field);
+}
+
+function cbi_d_update(target) {
+       if (!cbi_d[target]) {
+               return;
+       }
+       
+       for (var x in cbi_d[target]) {
+               for (var i=0; i<cbi_d[target][x].length; i++) { 
+                       var y = document.getElementById(cbi_d[target][x][i])    
+                       y.style.display = "none";
+               }
+       }
+       
+       var t = document.getElementById(target);
+       if (t && t.value && cbi_d[target][t.value]) {
+               for (var i=0; i<cbi_d[target][t.value].length; i++) {                   
+                       var y = document.getElementById(cbi_d[target][t.value][i])
+                       if (!y.value) { 
+                               y.style.display = "table-row";
+                       } else {
+                               y.style.display = "block";
+                       }
+               }
+       }
+}
+
+function cbi_d_init() {
+       for (var x in cbi_d) {
+               cbi_d_update(x);
+       }
+}
\ No newline at end of file
diff --git a/themes/fledermaus/root/www/luci/media/logo.png b/themes/fledermaus/root/www/luci/media/logo.png
new file mode 100644 (file)
index 0000000..d4c5dd9
Binary files /dev/null and b/themes/fledermaus/root/www/luci/media/logo.png differ