diff options
author | Katze Miau <miaukatzemiau@priveasy.de> | 2011-12-11 16:45:08 (GMT) |
---|---|---|
committer | Katze Miau <miaukatzemiau@priveasy.de> | 2011-12-11 16:45:08 (GMT) |
commit | 65c39ba8336b9efc1d76350ae27a18da6d51d5f6 (patch) | |
tree | 153e9f49fb41e451c75b5a824f119cfab019db6e /files/common/etc/fsm/inetable/trans/queen.enter | |
parent | ee91359463ae23b2ebe5cb235c7e11d362be81c8 (diff) |
fsm inetable: change httpd instances in queen/ghost/robinson states
- update the redirection uhttpd config and www-root to redirect all
incoming request to a url specified by /tmp/redirection_target
- use this to implement robinson and splash redirection during
robinson and queen/ghost states, respectively
- change the service httpd to listen on the public IPv4 address
available on the mesh interface in those states.
Missing is the
- iptable based redirection
- already referenced /sbin/urlencode
Diffstat (limited to 'files/common/etc/fsm/inetable/trans/queen.enter')
-rwxr-xr-x | files/common/etc/fsm/inetable/trans/queen.enter | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/files/common/etc/fsm/inetable/trans/queen.enter b/files/common/etc/fsm/inetable/trans/queen.enter index fe0799e..c8ec801 100755 --- a/files/common/etc/fsm/inetable/trans/queen.enter +++ b/files/common/etc/fsm/inetable/trans/queen.enter @@ -25,13 +25,14 @@ if [ -z "$oct3" ]; then # TODO: log warning about IPv4 addr space exhaustion fi [ -n "$oct3" ] +gwip=10.17.$oct3.1 p2ptbl update $gwiptbl $oct3 "queen\t$NodeId" br-mesh # activate gw mode batctl gw server # set up gw IP -mesh_add_ipv4 10.17.$oct3.1 255.255.0.0 +mesh_add_ipv4 $gwip 255.255.0.0 # TODO: load splash status @@ -42,7 +43,12 @@ set dhcp.mesh.start=2 set dhcp.mesh.limit=254 set dhcp.mesh.leasetime=$DHCPLeaseTime set dhcp.mesh.interface=mesh -set dhcp.mesh.start_ip=10.17.$oct3.2 -set dhcp.mesh.end_ip=10.17.$oct3.254 " | uci batch -/etc/init.d/dnsmasq restart
\ No newline at end of file +/etc/init.d/dnsmasq restart + +# start redirection httpd (for splash), add GW IP to the addrs service +# httpd listens on +echo "http://$gwip/cgi-bin/splash? /sbin/urlencode" > /tmp/redirection_target +enable_httpd redirection $randnet.1:81 +change_service_httpd_listen $gwip:80 +/etc/init.d/uhttpd restart |