diff options
author | Steven Barth <steven@midlink.org> | 2008-06-15 18:54:44 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-15 18:54:44 +0000 |
commit | 6fa9ec035b262c5aec11962329aa3d6da72c5af9 (patch) | |
tree | 991aeb2eef60130c4fc41428552912c582cd2593 /libs | |
parent | d5d8e8c86724b4a154b7af9c94e0eec70a485868 (diff) |
* Removed support for Haserl
Diffstat (limited to 'libs')
-rwxr-xr-x | libs/sgi-cgi/ipkg/postinst | 11 | ||||
-rw-r--r-- | libs/sgi-haserl/Makefile | 2 | ||||
-rwxr-xr-x | libs/sgi-haserl/htdocs/cgi-bin/index.cgi | 3 | ||||
-rwxr-xr-x | libs/sgi-haserl/htdocs/cgi-bin/luci | 4 | ||||
-rwxr-xr-x | libs/sgi-haserl/htdocs/cgi-bin/luci-upload | 4 | ||||
-rw-r--r-- | libs/sgi-haserl/htdocs/index.html | 10 | ||||
-rwxr-xr-x | libs/sgi-haserl/ipkg/postinst | 9 | ||||
-rw-r--r-- | libs/sgi-haserl/luasrc/sgi/haserl.lua | 72 |
8 files changed, 11 insertions, 104 deletions
diff --git a/libs/sgi-cgi/ipkg/postinst b/libs/sgi-cgi/ipkg/postinst new file mode 100755 index 0000000000..bbc1e53812 --- /dev/null +++ b/libs/sgi-cgi/ipkg/postinst @@ -0,0 +1,11 @@ +#!/bin/sh +[ -f "${IPKG_INSTROOT}/etc/httpd.conf" ] && { + PATTERNS='/cgi-bin/luci/admin: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 +} diff --git a/libs/sgi-haserl/Makefile b/libs/sgi-haserl/Makefile deleted file mode 100644 index 81a96f6a83..0000000000 --- a/libs/sgi-haserl/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -include ../../build/config.mk -include ../../build/module.mk
\ No newline at end of file diff --git a/libs/sgi-haserl/htdocs/cgi-bin/index.cgi b/libs/sgi-haserl/htdocs/cgi-bin/index.cgi deleted file mode 100755 index aae8591c6a..0000000000 --- a/libs/sgi-haserl/htdocs/cgi-bin/index.cgi +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/haserl --shell=luac -print("Status: 302 Found") -print("Location: luci\n") diff --git a/libs/sgi-haserl/htdocs/cgi-bin/luci b/libs/sgi-haserl/htdocs/cgi-bin/luci deleted file mode 100755 index fd8e5941a5..0000000000 --- a/libs/sgi-haserl/htdocs/cgi-bin/luci +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/haserl --shell=luac -require("luci.sgi.haserl") -luci.dispatcher.indexcache = "/tmp/.luciindex" -luci.sgi.haserl.run()
\ No newline at end of file diff --git a/libs/sgi-haserl/htdocs/cgi-bin/luci-upload b/libs/sgi-haserl/htdocs/cgi-bin/luci-upload deleted file mode 100755 index 371967ce98..0000000000 --- a/libs/sgi-haserl/htdocs/cgi-bin/luci-upload +++ /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("luci")
\ No newline at end of file diff --git a/libs/sgi-haserl/htdocs/index.html b/libs/sgi-haserl/htdocs/index.html deleted file mode 100644 index 39ba558dfb..0000000000 --- a/libs/sgi-haserl/htdocs/index.html +++ /dev/null @@ -1,10 +0,0 @@ -<?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"> -<head> -<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">LuCI - Lua Configuration Interface</a> -</body> -</html>
\ No newline at end of file diff --git a/libs/sgi-haserl/ipkg/postinst b/libs/sgi-haserl/ipkg/postinst deleted file mode 100755 index 483a0867a4..0000000000 --- a/libs/sgi-haserl/ipkg/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 diff --git a/libs/sgi-haserl/luasrc/sgi/haserl.lua b/libs/sgi-haserl/luasrc/sgi/haserl.lua deleted file mode 100644 index 88b7f00758..0000000000 --- a/libs/sgi-haserl/luasrc/sgi/haserl.lua +++ /dev/null @@ -1,72 +0,0 @@ ---[[ -LuCI - SGI-Module for Haserl - -Description: -Server Gateway Interface for Haserl - -FileId: -$Id: haserl.lua 2027 2008-05-07 21:16:35Z Cyrus $ - -License: -Copyright 2008 Steven Barth <steven@midlink.org> - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- -module("luci.sgi.haserl", package.seeall) -require("luci.http") -require("luci.util") -require("luci.dispatcher") - -function run() - local r = luci.http.Request(ENV, nil, io.stderr) - r.get = normalize_table(FORM) - r.post = r.get - - local x = coroutine.create(luci.dispatcher.httpdispatch) - while coroutine.status(x) ~= "dead" do - local res, id, data1, data2 = coroutine.resume(x, r) - - if not res then - print("Status: 500 Internal Server Error") - print("Content-Type: text/plain\n") - print(id) - break; - end - - if id == 1 then - io.write("Status: " .. tostring(data1) .. " " .. data2 .. "\n") - elseif id == 2 then - io.write(data1 .. ": " .. data2 .. "\n") - elseif id == 3 then - io.write("\n") - elseif id == 4 then - io.write(data1) - end - end -end - -function normalize_table(table, prefix) - prefix = prefix and prefix .. "." or "" - local new = {} - - for k,v in pairs(table) do - if type(v) == "table" and #v == 0 then - luci.util.update(new, normalize_table(v, prefix .. k)) - else - new[prefix .. k] = v - end - end - - return new -end |