summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-splash')
-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
6 files changed, 29 insertions, 29 deletions
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