From b8e71be77335c16e4bd60d05029c52225165c5c5 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 28 Oct 2010 16:58:44 +0000 Subject: [PATCH] luci-0.9: merge r6343 --- .../htdocs/cgi-bin/splash/splash.sh | 3 ++ .../luci-splash/root/etc/init.d/luci_splash | 48 +++++++++---------- 2 files changed, 25 insertions(+), 26 deletions(-) create mode 100755 applications/luci-splash/htdocs/cgi-bin/splash/splash.sh diff --git a/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh b/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh new file mode 100755 index 000000000..c9d614bf1 --- /dev/null +++ b/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh @@ -0,0 +1,3 @@ +#!/bin/sh +echo -en "Status: 302 Moved\r\n" +echo -en "Location: http://$SERVER_ADDR/cgi-bin/luci/splash\r\n\r\n" diff --git a/applications/luci-splash/root/etc/init.d/luci_splash b/applications/luci-splash/root/etc/init.d/luci_splash index 351b9b376..d6f0a3376 100755 --- a/applications/luci-splash/root/etc/init.d/luci_splash +++ b/applications/luci-splash/root/etc/init.d/luci_splash @@ -24,29 +24,29 @@ ipt_log() { iface_add() { local cfg="$1" - + config_get zone "$cfg" zone [ -n "$zone" ] || return 0 - + config_get net "$cfg" network [ -n "$net" ] || return 0 config_get ifname "$net" ifname [ -n "$ifname" ] || return 0 - + config_get ipaddr "$net" ipaddr [ -n "$ipaddr" ] || return 0 - + config_get netmask "$net" netmask [ -n "$netmask" ] || return 0 - + config_get parentiface "$net" interface [ -n "$parentiface" ] && { config_get parentproto "$parentiface" proto config_get parentipaddr "$parentiface" ipaddr config_get parentnetmask "$parentiface" netmask } - + eval "$(ipcalc.sh $ipaddr $netmask)" ### Add interface specific chain entry rules @@ -67,7 +67,7 @@ iface_add() { } iface_del() { - config_get zone "$1" zone + config_get zone "$1" zone [ -n "$zone" ] || return 0 config_get net "$1" network @@ -92,10 +92,10 @@ mac_add() { subnet_add() { local cfg="$1" - + config_get ipaddr "$cfg" ipaddr config_get netmask "$cfg" netmask - + [ -n "$ipaddr" ] && { iptables -t nat -I luci_splash_prerouting -d "$ipaddr/${netmask:-32}" -j RETURN iptables -t filter -I luci_splash_forwarding -d "$ipaddr/${netmask:-32}" -j RETURN @@ -134,7 +134,7 @@ qos_iface_add() { # set client upload speed tc filter add dev "$iface" parent ffff: protocol ip prio 1 \ handle 79 fw police rate ${LIMIT_UP}kbit mtu 6k burst 6k drop - fi + fi } qos_iface_del() { @@ -147,20 +147,16 @@ qos_iface_del() { boot() { ### Setup splash-relay - uci get lucid.splashr 2>/dev/null || { + uci get uhttpd.splash 2>/dev/null || { uci batch <