summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash/root
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-11 20:27:10 +0000
committerSteven Barth <steven@midlink.org>2008-06-11 20:27:10 +0000
commit92a919d8eec152aa1803e328aff68a3b3c283e77 (patch)
tree69c79f0f98b4dfd9bd7d5ce68025cf1e58c179ae /applications/luci-splash/root
parentaeb411d19d6b22ff17695f5a8be8cadf93445d9e (diff)
* applications/luci-splash: Removed dependency to sgi-haserl, Updated attributes
Diffstat (limited to 'applications/luci-splash/root')
-rwxr-xr-x[-rw-r--r--]applications/luci-splash/root/etc/cron.minutely/luci_splash0
-rwxr-xr-x[-rw-r--r--]applications/luci-splash/root/etc/init.d/luci_splash0
-rwxr-xr-x[-rw-r--r--]applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi15
-rwxr-xr-x[-rw-r--r--]applications/luci-splash/root/usr/sbin/luci-splash0
-rwxr-xr-x[-rw-r--r--]applications/luci-splash/root/www/cgi-bin/luci-splash0
5 files changed, 8 insertions, 7 deletions
diff --git a/applications/luci-splash/root/etc/cron.minutely/luci_splash b/applications/luci-splash/root/etc/cron.minutely/luci_splash
index eae429474..eae429474 100644..100755
--- a/applications/luci-splash/root/etc/cron.minutely/luci_splash
+++ b/applications/luci-splash/root/etc/cron.minutely/luci_splash
diff --git a/applications/luci-splash/root/etc/init.d/luci_splash b/applications/luci-splash/root/etc/init.d/luci_splash
index 20f7865fd..20f7865fd 100644..100755
--- a/applications/luci-splash/root/etc/init.d/luci_splash
+++ b/applications/luci-splash/root/etc/init.d/luci_splash
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 22cab67cc..29679a21c 100644..100755
--- 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
@@ -1,6 +1,5 @@
-#!/usr/bin/haserl --shell=luac
+#!/usr/bin/lua
-require("luci.http")
require("luci.sys")
require("luci.model.uci")
@@ -8,7 +7,7 @@ luci.model.uci.set_savedir(luci.model.uci.savedir_state)
local srv
local net
-local ip = luci.http.env.REMOTE_ADDR
+local ip = os.getenv("REMOTE_ADDR")
luci.model.uci.foreach("network", "interface",
function (section)
if section.ipaddr then
@@ -30,10 +29,11 @@ luci.model.uci.foreach("luci_splash", "iface",
end)
if not srv then
- luci.http.prepare_content("text/plain")
+ print("Content-Type: text/plain\n")
print("Unable to detect network settings!")
elseif not stat then
- luci.http.redirect("http://" .. srv)
+ print("Status: 302 Found")
+ print("Location: http://" .. srv)
else
local action = "splash"
@@ -48,5 +48,6 @@ else
action = "allowed"
end
- luci.http.redirect("http://" .. srv .. "/cgi-bin/luci-splash/" .. action)
-end \ No newline at end of file
+ print("Status: 302 Found")
+ print("Location: http://" .. srv .. "/cgi-bin/luci-splash/" .. action)
+end
diff --git a/applications/luci-splash/root/usr/sbin/luci-splash b/applications/luci-splash/root/usr/sbin/luci-splash
index 72456c01e..72456c01e 100644..100755
--- a/applications/luci-splash/root/usr/sbin/luci-splash
+++ b/applications/luci-splash/root/usr/sbin/luci-splash
diff --git a/applications/luci-splash/root/www/cgi-bin/luci-splash b/applications/luci-splash/root/www/cgi-bin/luci-splash
index c75593fbe..c75593fbe 100644..100755
--- a/applications/luci-splash/root/www/cgi-bin/luci-splash
+++ b/applications/luci-splash/root/www/cgi-bin/luci-splash