* DHCP-Splash fixes #1
authorSteven Barth <redacted>
Sun, 11 May 2008 10:29:45 +0000 (10:29 +0000)
committerSteven Barth <redacted>
Sun, 11 May 2008 10:29:45 +0000 (10:29 +0000)
applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi
applications/luci-splash/root/www/cgi-bin/luci-splash [moved from applications/luci-splash/root/www/cgi-bin/luci_splash.cgi with 100% similarity]
applications/luci-splash/src/controller/splash/splash.lua [moved from applications/luci-splash/src/controller/controller.lua with 100% similarity]
applications/luci-splash/src/model/v/splash/splash.htm [moved from applications/luci-splash/src/model/view/splash/splash.htm with 100% similarity]
applications/luci-splash/src/model/v/splash_splash/index.htm [moved from applications/luci-splash/src/model/view/splash_splash/index.htm with 100% similarity]
applications/luci-splash/src/model/v/splash_splash/splash.htm [moved from applications/luci-splash/src/model/view/splash_splash/splash.htm with 100% similarity]
contrib/package/ffluci/Makefile

index 341aaa4b56e1dbdd82405b57321714bfb7eaf725..11430f0acc368736266b36d8bedb46e19380ee14 100644 (file)
@@ -29,24 +29,22 @@ end
 
 if not srv then
        ffluci.http.prepare_content("text/plain")
-       return print("Unable to detect network settings!")
-end
-
-if not stat then
+       print("Unable to detect network settings!")
+elseif not stat then
        ffluci.http.redirect("http://" .. srv)
-end
-
-local action = "splash"
-
-local mac = ffluci.sys.net.ip4mac(ip)
-if not mac then
-       action = "unknown"
-end
-
-local status = ffluci.sys.execl("luci-splash status "..mac)[1]
-
-if status == "whitelisted" or status == "lease" then
-       action = "allowed"
-end
-
-ffluci.http.redirect("http://" .. srv .. "/cgi-bin/luci-splash/" .. action)
\ No newline at end of file
+else
+       local action = "splash"
+       
+       local mac = ffluci.sys.net.ip4mac(ip)
+       if not mac then
+               action = "unknown"
+       end
+       
+       local status = ffluci.sys.execl("luci-splash status "..mac)[1]
+       
+       if status == "whitelisted" or status == "lease" then
+               action = "allowed"
+       end
+       
+       ffluci.http.redirect("http://" .. srv .. "/cgi-bin/luci-splash/" .. action)
+end
\ No newline at end of file
index af17aa57a15c562dcd86d8a032e4b272eb50e6b1..8f1d7f0aa9c1372db2f8037bbd8d880108460331 100644 (file)
@@ -156,6 +156,7 @@ define Package/ffluci-app-splash/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi $(1)/usr/lib/luci-splash/htdocs/cgi-bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash
 endef
 
 
git clone https://git.99rst.org/PROJECT