From: Jo-Philipp Wich Date: Wed, 11 Jun 2014 13:33:03 +0000 (+0000) Subject: build: remove abandonned sgi libraries X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e4be3f94a0adf6c77e4c080c8b7180b31fa5836b;p=project%2Fluci.git build: remove abandonned sgi libraries --- diff --git a/libs/sgi-luci/Makefile b/libs/sgi-luci/Makefile deleted file mode 100644 index 81a96f6a83..0000000000 --- a/libs/sgi-luci/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-luci/hostfiles/usr/lib/lucittpd/plugins/luci-webui.lua b/libs/sgi-luci/hostfiles/usr/lib/lucittpd/plugins/luci-webui.lua deleted file mode 100644 index 073e567c0a..0000000000 --- a/libs/sgi-luci/hostfiles/usr/lib/lucittpd/plugins/luci-webui.lua +++ /dev/null @@ -1,29 +0,0 @@ -function initialize() - pcall(function() - local SYSROOT = os.getenv("LUCI_SYSROOT") - require "uci" - require "luci.model.uci".cursor = function(config, save) - return uci.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci") - end - - local x = require "luci.uvl".UVL.__init__ - require "luci.uvl".UVL.__init__ = function(self, schemedir) - x(self, schemedir or SYSROOT .. "/lib/uci/schema") - end - - require("luci.sys") - luci.sys.user.checkpasswd = function() return true end - - require "luci.dispatcher" - require "luci.uvl" - require "luci.cbi" - require "luci.template" - require "luci.json" - end) -end - --- Initialize LuCI -function register() - local lucihnd = require "luci.ttpd.handler.luci" - httpd.server:get_default_vhost():set_handler("/luci", lucihnd.Luci()) -end \ No newline at end of file diff --git a/libs/sgi-luci/luasrc/ttpd/handler/luci.lua b/libs/sgi-luci/luasrc/ttpd/handler/luci.lua deleted file mode 100644 index eb60625211..0000000000 --- a/libs/sgi-luci/luasrc/ttpd/handler/luci.lua +++ /dev/null @@ -1,92 +0,0 @@ ---[[ - -HTTP server implementation for LuCI - luci handler -(c) 2008 Steven Barth - -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 - -$Id$ - -]]-- -local dsp = require "luci.dispatcher" -local util = require "luci.util" -local http = require "luci.http" -local ltn12 = require "luci.ltn12" -local mod = require "luci.ttpd.module" -local table = require "table" -local coroutine = require "coroutine" - -module "luci.ttpd.handler.luci" - -Luci = util.class(mod.Handler) -Response = mod.Response - -function Luci.__init__(self, limit) - mod.Handler.__init__(self) -end - -function Luci.handle_head(self, ...) - return (self:handle_get(...)) -end - -function Luci.handle_post(self, ...) - return self:handle_get(...) -end - -function Luci.handle_get(self, request, sourcein, sinkerr) - local r = http.Request( - request.env, - sourcein, - sinkerr - ) - - local res, id, data1, data2 = true, 0, nil, nil - local headers = {} - local status = 200 - local active = true - - local x = coroutine.create(dsp.httpdispatch) - while not id or id < 3 do - res, id, data1, data2 = coroutine.resume(x, r) - - if not res then - status = 500 - headers["Content-Type"] = "text/plain" - local err = {id} - return Response( status, headers ), function() return table.remove(err) end - end - - if id == 1 then - status = data1 - elseif id == 2 then - headers[data1] = data2 - end - end - - local function iter() - local res, id, data = coroutine.resume(x) - if not res then - return nil, id - elseif not id or not active then - return true - elseif id == 5 then - active = false - - while (coroutine.resume(x)) do - end - - return nil - elseif id == 4 then - return data - end - if coroutine.status(x) == "dead" then - return nil - end - end - - return Response(status, headers), iter -end diff --git a/libs/sgi-luci/root/usr/lib/lucittpd/plugins/luci-webui.lua b/libs/sgi-luci/root/usr/lib/lucittpd/plugins/luci-webui.lua deleted file mode 100644 index 1204667892..0000000000 --- a/libs/sgi-luci/root/usr/lib/lucittpd/plugins/luci-webui.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Initialize LuCI -function initialize() - pcall(function() - require "luci.dispatcher" - require "luci.uvl" - require "luci.cbi" - require "luci.template" - require "luci.json" - end) -end - --- Register luci -function register() - local lucihnd = require "luci.ttpd.handler.luci".Luci() - httpd.server:get_default_vhost():set_handler("/luci", lucihnd) - httpd.server:get_default_vhost():set_handler("/cgi-bin/luci", lucihnd) -end diff --git a/libs/sgi-wsapi/Makefile b/libs/sgi-wsapi/Makefile deleted file mode 100644 index 81a96f6a83..0000000000 --- a/libs/sgi-wsapi/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-wsapi/luasrc/sgi/wsapi.lua b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua deleted file mode 100644 index 836295be92..0000000000 --- a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua +++ /dev/null @@ -1,79 +0,0 @@ ---[[ -LuCI - SGI-Module for WSAPI - -Description: -Server Gateway Interface for WSAPI - -FileId: -$Id$ - -License: -Copyright 2008 Steven Barth - -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.wsapi", package.seeall) -local ltn12 = require("luci.ltn12") -require("luci.http") -require("luci.dispatcher") -require("luci.http.protocol") - -function run(wsapi_env) - local r = luci.http.Request( - wsapi_env, - ltn12.source.file(wsapi_env.input), - ltn12.sink.file(wsapi_env.error) - ) - - local res, id, data1, data2 = true, 0, nil, nil - local headers = {} - local status = 200 - - local x = coroutine.create(luci.dispatcher.httpdispatch) - local active = true - - while id < 3 do - res, id, data1, data2 = coroutine.resume(x, r) - - if not res then - status = 500 - headers["Content-Type"] = "text/plain" - local err = {id} - return status, headers, function() local x = table.remove(err) return x end - end - - if id == 1 then - status = data1 - elseif id == 2 then - headers[data1] = data2 - end - end - - local function iter() - local res, id, data = coroutine.resume(x) - if id == 4 and active then - return data - elseif id == 5 then - active = false - return "" - else - return "" - end - if coroutine.status(x) == "dead" then - return nil - end - end - - return status, headers, iter -end