* Makefile fixes ;-)
authorSteven Barth <steven@midlink.org>
Sat, 26 Apr 2008 17:55:16 +0000 (17:55 +0000)
committerSteven Barth <steven@midlink.org>
Sat, 26 Apr 2008 17:55:16 +0000 (17:55 +0000)
* Removed obsolete Haserl patch
* Added Client-Splash configuration page

contrib/package/ffluci/Makefile
contrib/package/haserl-lua/patches/100-cookie_prefix.patch [deleted file]
contrib/package/luci-splash/Makefile
module/admin-core/src/model/cbi/admin_network/splash.lua [new file with mode: 0644]
module/admin-core/src/model/menu/00admin.lua

index 32afd4a7f7ea26978bb32930e74643b28609b6b3..62fe0657afb269cf3ab2f8198caaaa05db0d59d2 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
+PKG_BUILD_DEPENDS:=lua-luci
+
 MAKE_ACTION:=compile LUAC=$(BUILD_DIR_HOST)/lua-luci/luac
 
 include $(INCLUDE_DIR)/package.mk
@@ -23,6 +25,7 @@ define Package/ffluci
   SECTION:=admin
   CATEGORY:=Administration
   TITLE:=FFLuCI
+  SUBMENU:=FFLuCI
   DEPENDS:=+luaposix +haserl-lua
   MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
 endef
diff --git a/contrib/package/haserl-lua/patches/100-cookie_prefix.patch b/contrib/package/haserl-lua/patches/100-cookie_prefix.patch
deleted file mode 100644 (file)
index 0547d9d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- haserl-0.9.23.orig/src/haserl.c    2008-03-18 18:17:55.000000000 +0100
-+++ haserl-0.9.23/src/haserl.c 2008-03-27 16:58:27.000000000 +0100
-@@ -340,7 +340,7 @@
-       {
-         token++;
-       }
--      myputenv (env, token, global.var_prefix);
-+      myputenv (env, token, global.cookie_prefix);
-       token = strtok (NULL, ";");
-     }
-   free (qs);
-@@ -614,6 +614,7 @@
-   global.acceptall = FALSE;   /* don't allow POST data for GET method         */
-   global.uploadlist = NULL;   /* we don't have any uploaded files             */
-   global.var_prefix = HASERL_VAR_PREFIX;
-+  global.cookie_prefix = "COOKIE_";
-   global.nul_prefix = "";
- }
---- haserl-0.9.23.orig/src/haserl.h    2008-01-25 22:11:38.000000000 +0100
-+++ haserl-0.9.23/src/haserl.h 2008-03-27 16:58:18.000000000 +0100
-@@ -10,6 +10,7 @@
-   char *uploaddir;              /* where we upload to                                   */
-   char *uploadhandler;                /* a handler for uploads                                */
-   char *var_prefix;           /* what name we give to FORM variables                  */
-+  char *cookie_prefix;
-   char *nul_prefix;           /* what name we give to environment variables           */
-   token_t *uploadlist;                /* a linked list of pathspecs                           */
-   int debug;                    /* true if in "debug" mode                              */
index e1e194cbd56b087469444397a9ca99166c2f42c7..eb41fde5dcde45a8d12bf14344699557052837e7 100644 (file)
@@ -12,11 +12,14 @@ include $(INCLUDE_DIR)/package.mk
 define Package/luci-splash
   SECTION:=admin
   CATEGORY:=Administration
-  SUBMENU:=ffluci
-  DEPENDS:=+ffluci
+  SUBMENU:=FFLuCI
+  DEPENDS:=+ffluci +iptables-mod-nat
   TITLE:=FFLuCI DHCP-Splash
 endef
 
+define Build/Compile
+endef
+
 define Package/luci-splash/install
        $(INSTALL_DIR) $(1)/usr/lib/luci_splash/htdocs
        $(INSTALL_DIR) $(1)/etc/config
diff --git a/module/admin-core/src/model/cbi/admin_network/splash.lua b/module/admin-core/src/model/cbi/admin_network/splash.lua
new file mode 100644 (file)
index 0000000..497d394
--- /dev/null
@@ -0,0 +1,27 @@
+-- ToDo: Translate, Add descriptions and help texts
+require("ffluci.model.uci")
+
+m = Map("luci_splash", "Client-Splash", [[Client-Splash ist das Freifunk Hotspot-Authentifizierungs-System.]])
+
+s = m:section(TypedSection, "iface", "Schnittstellen")
+s.addremove = true
+s.anonymous = true
+
+iface = s:option(ListValue, "network", "Schnittstelle")
+for k, v in pairs(ffluci.model.uci.show("network").network) do
+       if v[".type"] == "interface" and k ~= "loopback" then
+               iface:value(k)
+       end
+end
+
+s = m:section(TypedSection, "whitelist", "Automatische Freigabe")
+s.addremove = true
+s.anonymous = true
+s:option(Value, "mac", "MAC-Adresse")
+
+s = m:section(TypedSection, "blacklist", "Automatische Sperrung")
+s.addremove = true
+s.anonymous = true
+s:option(Value, "mac", "MAC-Adresse")
+       
+return m
\ No newline at end of file
index 3a6ee1d6aa449c66842380e37f1213902028e896..42c185937dff7dc31152ff1b7898d091e58471ce 100644 (file)
@@ -28,6 +28,10 @@ act("routes", "Statische Routen")
 act("portfw", "Portweiterleitung")
 act("firewall", "Firewall")
 
+if isfile("/etc/config/luci_splash") then
+       act("splash", "Client-Splash")
+end
+
 if isfile("/etc/config/qos") then
        act("qos", "Quality of Service")
 end