--- /dev/null
+++ b/net/coova-chilli/files/coova.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html><head><title>Wireless HotSpot</title>
+<!-- redirecting... either by meta tag or javascript -->
+<script type="text/javascript" language="Javascript">
+//<!--
+function getURLParam(n) {
+  var s = "";
+  var href = window.location.href;
+  var idx = href.indexOf("?");
+  if (idx > -1) {
+    var qs = href.substr(idx + 1);
+    idx = qs.indexOf(n + "=");
+    if (idx > -1) {
+      s = qs.substr(idx + n.length + 1);
+      if (s.charAt(4) == '%' || s.charAt(5) == '%') {
+        s = s.replace(/%3a/g, ":");
+        s = s.replace(/%2f/g, "/");
+        s = s.replace(/%3f/g, "?");
+        s = s.replace(/%3d/g, "=");
+        s = s.replace(/%26/g, "&");
+        s = s.replace(/%25/g, "%");
+        s = s.replace(/\+/g, " ");
+      }
+      return s;
+    }
+  }
+}
+var loginUrl = getURLParam("loginurl");
+if (loginUrl != '') window.document.write("<meta http-equiv=\"refresh\" content=\"0; URL="+loginUrl+"\">");
+function redirect() { window.location = loginUrl; return false; }
+//-->
+</script>
+<meta http-equiv="refresh" content="0; URL=/prelogin">
+</head>
+<body style="margin: 0pt auto; height:100%;">
+<div style="width:100%;height:80%;position:fixed;display:table;">
+<p style="display: table-cell; line-height: 2.5em;
+vertical-align:middle;text-align:center;color:grey;">
+<a href="#" onclick="javascript:return redirect();">
+<img src="hotspot.jpg" alt="" border="0"/></a><br>
+<small><img src="wait.gif"/> redirecting...</small></p>
+<br><br>
+</div>
+</body>
+</html>
+
--- /dev/null
+++ b/net/coova-chilli/files/make-splash.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+splashtxt=$1; shift
+
+cat<<EOF
+<?
+  . ./config.sh
+  http_header
+?>
+EOF
+
+cat $splashtxt | \
+    awk -v ORS="---NEWLINE---" '{
+         gsub(/\r/,"");
+         print
+    }' |\
+    sed -e 's#<?.*?>##g' \
+	-e 's#$authtarget#<? local_login_url ?>#g' \
+        -e 's#<local_login_url/>#<? local_login_url ?>#g' \
+        -e 's#<local_login_url></local_login_url>#<? local_login_url ?>#g' \
+        -e 's#<loginform/>#<? loginform ?>#g' \
+        -e 's#<loginform></loginform>#<? loginform ?>#g' \
+        -e 's#<reply-message/>#<? reply_message ?>#g' \
+        -e 's#<reply-message></reply-message>#<? reply_message ?>#g' \
+        -e 's#<authenticated/>#<? echo -n "$AUTHENTICATED" ?>#g' \
+        -e 's#<authenticated></authenticated>#<? echo -n "$AUTHENTICATED" ?>#g' \
+        -e 's#<userurl/>#<? echo -n "$COOVA_USERURL" ?>#g' \
+        -e 's#<userurl></userurl>#<? echo -n "$COOVA_USERURL" ?>#g' \
+        -e 's#<sessionid/>#<? echo -n "$CHI_SESSION_ID" ?>#g' \
+        -e 's#<sessionid></sessionid>#<? echo -n "$CHI_SESSION_ID" ?>#g' \
+        -e 's#<input_bytes/>#<? echo -n "$CHI_INPUT_BYTES" ?>#g' \
+        -e 's#<input_bytes></input_bytes>#<? echo -n "$CHI_INPUT_BYTES" ?>#g' \
+        -e 's#<output_bytes/>#<? echo -n "$CHI_OUTPUT_BYTES" ?>#g' \
+        -e 's#<output_bytes></output_bytes>#<? echo -n "$CHI_OUTPUT_BYTES" ?>#g' | \
+    awk -v RS="---NEWLINE---" '{
+         gsub(/"\/images\/[^"]+"/,"\"<? image & ?>\"");
+         print
+    }'
+
--- a/net/coova-chilli/Makefile	(revision 27447)
+++ b/net/coova-chilli/Makefile	(working copy)
@@ -52,6 +52,9 @@
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli* $(1)/usr/sbin/
 	$(INSTALL_DIR) $(1)/usr/lib/
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
+	$(CP) files/make-splash.sh $(1)/etc/chilli/
+	$(CP) files/coova.html $(1)/etc/chilli/www/
+	$(CP) files/hotspot.jpg $(1)/etc/chilli/www/
 endef
 
 $(eval $(call BuildPackage,coova-chilli))
