summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/community-halle/root/etc/uci-defaults/luci-community-halle (renamed from applications/community-halle/root/etc/uci-defaults/ffluci-community-halle)0
-rw-r--r--applications/community-hannover/root/etc/uci-defaults/luci-community-hannover (renamed from applications/community-hannover/root/etc/uci-defaults/ffluci-community-hannover)0
-rw-r--r--applications/community-leipzig/root/etc/uci-defaults/luci-community-leipzig (renamed from applications/community-leipzig/root/etc/uci-defaults/ffluci-community-leipzig)0
-rw-r--r--applications/luci-ffwizard-leipzig/src/controller/luci_ffwizard_leipzig/wizard.lua28
-rw-r--r--applications/luci-ffwizard-leipzig/src/view/freifunk/wizard.htm4
-rw-r--r--applications/luci-fw/src/controller/luci_fw/luci_fw.lua2
-rw-r--r--applications/luci-fw/src/model/cbi/luci_fw/firewall.lua2
-rw-r--r--applications/luci-fw/src/model/cbi/luci_fw/portfw.lua4
-rw-r--r--applications/luci-fw/src/model/cbi/luci_fw/routing.lua4
-rw-r--r--applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi26
-rw-r--r--applications/luci-splash/root/usr/lib/luci-splash/htdocs/index.html2
-rw-r--r--applications/luci-splash/root/usr/sbin/luci-splash10
-rw-r--r--applications/luci-splash/root/www/cgi-bin/luci-splash2
-rw-r--r--applications/luci-splash/src/controller/splash/splash.lua14
-rw-r--r--applications/luci-splash/src/model/cbi/splash/splash.lua4
-rwxr-xr-xapplications/sgi-haserl/root/www/cgi-bin/ffluci3
-rwxr-xr-xapplications/sgi-haserl/root/www/cgi-bin/index.cgi2
-rwxr-xr-xapplications/sgi-haserl/root/www/cgi-bin/luci3
-rwxr-xr-xapplications/sgi-haserl/root/www/cgi-bin/luci-upload (renamed from applications/sgi-haserl/root/www/cgi-bin/ffluci-upload)2
-rw-r--r--applications/sgi-haserl/root/www/index.html2
-rw-r--r--applications/sgi-haserl/src/sgi/haserl.lua46
-rw-r--r--applications/sgi-webuci/root/lib/webuci/main.lua4
-rw-r--r--applications/sgi-webuci/src/sgi/webuci.lua38
23 files changed, 101 insertions, 101 deletions
diff --git a/applications/community-halle/root/etc/uci-defaults/ffluci-community-halle b/applications/community-halle/root/etc/uci-defaults/luci-community-halle
index 8e4286a57..8e4286a57 100644
--- a/applications/community-halle/root/etc/uci-defaults/ffluci-community-halle
+++ b/applications/community-halle/root/etc/uci-defaults/luci-community-halle
diff --git a/applications/community-hannover/root/etc/uci-defaults/ffluci-community-hannover b/applications/community-hannover/root/etc/uci-defaults/luci-community-hannover
index 97b7cefd3..97b7cefd3 100644
--- a/applications/community-hannover/root/etc/uci-defaults/ffluci-community-hannover
+++ b/applications/community-hannover/root/etc/uci-defaults/luci-community-hannover
diff --git a/applications/community-leipzig/root/etc/uci-defaults/ffluci-community-leipzig b/applications/community-leipzig/root/etc/uci-defaults/luci-community-leipzig
index 3ba84d018..3ba84d018 100644
--- a/applications/community-leipzig/root/etc/uci-defaults/ffluci-community-leipzig
+++ b/applications/community-leipzig/root/etc/uci-defaults/luci-community-leipzig
diff --git a/applications/luci-ffwizard-leipzig/src/controller/luci_ffwizard_leipzig/wizard.lua b/applications/luci-ffwizard-leipzig/src/controller/luci_ffwizard_leipzig/wizard.lua
index d6a704704..4f2390b37 100644
--- a/applications/luci-ffwizard-leipzig/src/controller/luci_ffwizard_leipzig/wizard.lua
+++ b/applications/luci-ffwizard-leipzig/src/controller/luci_ffwizard_leipzig/wizard.lua
@@ -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
diff --git a/applications/luci-ffwizard-leipzig/src/view/freifunk/wizard.htm b/applications/luci-ffwizard-leipzig/src/view/freifunk/wizard.htm
index b08703ffe..e3d6cb4c0 100644
--- a/applications/luci-ffwizard-leipzig/src/view/freifunk/wizard.htm
+++ b/applications/luci-ffwizard-leipzig/src/view/freifunk/wizard.htm
@@ -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
diff --git a/applications/luci-fw/src/controller/luci_fw/luci_fw.lua b/applications/luci-fw/src/controller/luci_fw/luci_fw.lua
index 9a92b9099..419097066 100644
--- a/applications/luci-fw/src/controller/luci_fw/luci_fw.lua
+++ b/applications/luci-fw/src/controller/luci_fw/luci_fw.lua
@@ -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)
diff --git a/applications/luci-fw/src/model/cbi/luci_fw/firewall.lua b/applications/luci-fw/src/model/cbi/luci_fw/firewall.lua
index 7c89d07c5..f58f74c2b 100644
--- a/applications/luci-fw/src/model/cbi/luci_fw/firewall.lua
+++ b/applications/luci-fw/src/model/cbi/luci_fw/firewall.lua
@@ -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)
diff --git a/applications/luci-fw/src/model/cbi/luci_fw/portfw.lua b/applications/luci-fw/src/model/cbi/luci_fw/portfw.lua
index 90ebb4c24..e4f4fa2ac 100644
--- a/applications/luci-fw/src/model/cbi/luci_fw/portfw.lua
+++ b/applications/luci-fw/src/model/cbi/luci_fw/portfw.lua
@@ -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
diff --git a/applications/luci-fw/src/model/cbi/luci_fw/routing.lua b/applications/luci-fw/src/model/cbi/luci_fw/routing.lua
index 5805b1d3f..364e69f62 100644
--- a/applications/luci-fw/src/model/cbi/luci_fw/routing.lua
+++ b/applications/luci-fw/src/model/cbi/luci_fw/routing.lua
@@ -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)
diff --git a/applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi b/applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi
index 11430f0ac..545233d8d 100644
--- a/applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi
+++ b/applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi
@@ -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
diff --git a/applications/luci-splash/root/usr/lib/luci-splash/htdocs/index.html b/applications/luci-splash/root/usr/lib/luci-splash/htdocs/index.html
index 58387a5fe..39ba558df 100644
--- a/applications/luci-splash/root/usr/lib/luci-splash/htdocs/index.html
+++ b/applications/luci-splash/root/usr/lib/luci-splash/htdocs/index.html
@@ -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
diff --git a/applications/luci-splash/root/usr/sbin/luci-splash b/applications/luci-splash/root/usr/sbin/luci-splash
index 2fa6bdd4a..f62d45c45 100644
--- a/applications/luci-splash/root/usr/sbin/luci-splash
+++ b/applications/luci-splash/root/usr/sbin/luci-splash
@@ -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
diff --git a/applications/luci-splash/root/www/cgi-bin/luci-splash b/applications/luci-splash/root/www/cgi-bin/luci-splash
index 188ad7aa0..c75593fbe 100644
--- a/applications/luci-splash/root/www/cgi-bin/luci-splash
+++ b/applications/luci-splash/root/www/cgi-bin/luci-splash
@@ -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
diff --git a/applications/luci-splash/src/controller/splash/splash.lua b/applications/luci-splash/src/controller/splash/splash.lua
index 7d837cd34..544f1e89e 100644
--- a/applications/luci-splash/src/controller/splash/splash.lua
+++ b/applications/luci-splash/src/controller/splash/splash.lua
@@ -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
diff --git a/applications/luci-splash/src/model/cbi/splash/splash.lua b/applications/luci-splash/src/model/cbi/splash/splash.lua
index fe4d2c3ee..6050ac8a0 100644
--- a/applications/luci-splash/src/model/cbi/splash/splash.lua
+++ b/applications/luci-splash/src/model/cbi/splash/splash.lua
@@ -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
index f3d85df64..000000000
--- a/applications/sgi-haserl/root/www/cgi-bin/ffluci
+++ /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/index.cgi b/applications/sgi-haserl/root/www/cgi-bin/index.cgi
index 31705ccf2..aae8591c6 100755
--- a/applications/sgi-haserl/root/www/cgi-bin/index.cgi
+++ b/applications/sgi-haserl/root/www/cgi-bin/index.cgi
@@ -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
index 000000000..8b06527a0
--- /dev/null
+++ b/applications/sgi-haserl/root/www/cgi-bin/luci
@@ -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/ffluci-upload b/applications/sgi-haserl/root/www/cgi-bin/luci-upload
index c31ddb822..371967ce9 100755
--- a/applications/sgi-haserl/root/www/cgi-bin/ffluci-upload
+++ b/applications/sgi-haserl/root/www/cgi-bin/luci-upload
@@ -1,4 +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("ffluci") \ No newline at end of file
+dofile("luci") \ No newline at end of file
diff --git a/applications/sgi-haserl/root/www/index.html b/applications/sgi-haserl/root/www/index.html
index 58387a5fe..39ba558df 100644
--- a/applications/sgi-haserl/root/www/index.html
+++ b/applications/sgi-haserl/root/www/index.html
@@ -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
diff --git a/applications/sgi-haserl/src/sgi/haserl.lua b/applications/sgi-haserl/src/sgi/haserl.lua
index f3a6ee613..f3994b5c8 100644
--- a/applications/sgi-haserl/src/sgi/haserl.lua
+++ b/applications/sgi-haserl/src/sgi/haserl.lua
@@ -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
diff --git a/applications/sgi-webuci/root/lib/webuci/main.lua b/applications/sgi-webuci/root/lib/webuci/main.lua
index f21934e0a..478c2a94e 100644
--- a/applications/sgi-webuci/root/lib/webuci/main.lua
+++ b/applications/sgi-webuci/root/lib/webuci/main.lua
@@ -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
diff --git a/applications/sgi-webuci/src/sgi/webuci.lua b/applications/sgi-webuci/src/sgi/webuci.lua
index f05fd2b0d..39eab3c4a 100644
--- a/applications/sgi-webuci/src/sgi/webuci.lua
+++ b/applications/sgi-webuci/src/sgi/webuci.lua
@@ -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