* Removed support for Haserl
This commit is contained in:
parent
d5d8e8c867
commit
6fa9ec035b
12 changed files with 11 additions and 171 deletions
Binary file not shown.
|
@ -1,40 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=haserl-lua
|
|
||||||
PKG_VERSION:=0.9.24
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
||||||
PKG_SOURCE_URL:=http://dev.leipzig.freifunk.net/svn/ff-luci/trunk/contrib/package-source/ \
|
|
||||||
http://firmware.freifunk-halle.net/luci/package-source/
|
|
||||||
PKG_MD5SUM:=b004005594b84e35839b1d5c330f8e03
|
|
||||||
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/haserl-lua
|
|
||||||
SECTION:=utils
|
|
||||||
CATEGORY:=Utilities
|
|
||||||
TITLE:=A CGI wrapper to embed shell scripts in HTML documents
|
|
||||||
URL:=http://haserl.sourceforge.net/
|
|
||||||
DEPENDS:=+liblua
|
|
||||||
endef
|
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
|
||||||
--with-lua
|
|
||||||
|
|
||||||
define Package/haserl-lua/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(STRIP) $(PKG_BUILD_DIR)/src/haserl
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/
|
|
||||||
echo "Replaces: haserl" >> $(1)/CONTROL/control
|
|
||||||
echo "Conflicts: haserl" >> $(1)/CONTROL/control
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,haserl-lua))
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff -ur haserl-0.9.23.orig/src/haserl_lualib.inc haserl-0.9.23/src/haserl_lualib.inc
|
|
||||||
--- haserl-0.9.23.orig/src/haserl_lualib.inc 2008-04-05 16:40:35.000000000 +0200
|
|
||||||
+++ haserl-0.9.23/src/haserl_lualib.inc 2008-04-05 16:41:37.000000000 +0200
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
/* This file was automatically generated from haserl_lualib.lua. DO NOT EDIT */
|
|
||||||
|
|
||||||
static const unsigned char haserl_lualib[] = {
|
|
||||||
- 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 19, 0, 0, 0,
|
|
||||||
+ 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 4, 19, 0, 0, 0,
|
|
||||||
64,104, 97,115,101,114,108, 95,108,117, 97,108,105, 98, 46,108,
|
|
||||||
117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 16,
|
|
||||||
0, 0, 0, 10, 0, 0, 0, 74, 0, 0, 0,138, 0, 0, 0,135,
|
|
|
@ -322,17 +322,6 @@ define Package/luci-sgi-cgi/install
|
||||||
$(call Package/luci/install/template,$(1),libs/sgi-cgi)
|
$(call Package/luci/install/template,$(1),libs/sgi-cgi)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/luci-sgi-haserl
|
|
||||||
$(call Package/luci/libtemplate)
|
|
||||||
DEPENDS+=+luci-web +haserl-lua
|
|
||||||
TITLE:=SGI for Haserl
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/luci-sgi-haserl/install
|
|
||||||
$(call Package/luci/install/template,$(1),libs/sgi-haserl)
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
define Package/luci-sgi-webuci
|
define Package/luci-sgi-webuci
|
||||||
$(call Package/luci/libtemplate)
|
$(call Package/luci/libtemplate)
|
||||||
DEPENDS+=+luci-web
|
DEPENDS+=+luci-web
|
||||||
|
@ -441,9 +430,6 @@ endif
|
||||||
ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
|
ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
|
||||||
PKG_SELECTED_MODULES+=libs/sgi-cgi
|
PKG_SELECTED_MODULES+=libs/sgi-cgi
|
||||||
endif
|
endif
|
||||||
ifneq ($(CONFIG_PACKAGE_luci-sgi-haserl),)
|
|
||||||
PKG_SELECTED_MODULES+=libs/sgi-haserl
|
|
||||||
endif
|
|
||||||
ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
|
ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
|
||||||
PKG_SELECTED_MODULES+=libs/sgi-webuci
|
PKG_SELECTED_MODULES+=libs/sgi-webuci
|
||||||
endif
|
endif
|
||||||
|
@ -487,7 +473,6 @@ $(eval $(call BuildPackage,luci-app-splash))
|
||||||
$(eval $(call BuildPackage,luci-app-statistics))
|
$(eval $(call BuildPackage,luci-app-statistics))
|
||||||
|
|
||||||
$(eval $(call BuildPackage,luci-sgi-cgi))
|
$(eval $(call BuildPackage,luci-sgi-cgi))
|
||||||
$(eval $(call BuildPackage,luci-sgi-haserl))
|
|
||||||
$(eval $(call BuildPackage,luci-sgi-webuci))
|
$(eval $(call BuildPackage,luci-sgi-webuci))
|
||||||
|
|
||||||
$(eval $(call BuildPackage,luci-theme-fledermaus))
|
$(eval $(call BuildPackage,luci-theme-fledermaus))
|
||||||
|
|
11
libs/sgi-cgi/ipkg/postinst
Executable file
11
libs/sgi-cgi/ipkg/postinst
Executable file
|
@ -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
|
||||||
|
}
|
|
@ -1,2 +0,0 @@
|
||||||
include ../../build/config.mk
|
|
||||||
include ../../build/module.mk
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/haserl --shell=luac
|
|
||||||
print("Status: 302 Found")
|
|
||||||
print("Location: luci\n")
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/haserl --shell=luac
|
|
||||||
require("luci.sgi.haserl")
|
|
||||||
luci.dispatcher.indexcache = "/tmp/.luciindex"
|
|
||||||
luci.sgi.haserl.run()
|
|
|
@ -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")
|
|
|
@ -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>
|
|
|
@ -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
|
|
|
@ -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
|
|
Loading…
Reference in a new issue