diff options
author | Katze Miau <miaukatzemiau@priveasy.de> | 2011-12-20 19:34:03 (GMT) |
---|---|---|
committer | Katze Miau <miaukatzemiau@priveasy.de> | 2011-12-20 19:34:03 (GMT) |
commit | a68884e44d615ad3551bf4e9b81d47b9b6505336 (patch) | |
tree | 3ed8da1c44b850bba3dd5ef394c836e4acd70596 | |
parent | d7e1ba6fbf5d4c6ea4f72c604338aba73f1464e7 (diff) |
remove obsolete files: sbin/{setup_router,test_{gateway,vpn}}
- setup router is obsoleted by the autodiscovery of network status
implemented in the previous commits
- test_* is superseded by test_connectivity
-rwxr-xr-x | files/common/sbin/setup_router | 64 | ||||
-rwxr-xr-x | files/common/sbin/test_gateway | 15 | ||||
-rwxr-xr-x | files/common/sbin/test_vpn | 15 |
3 files changed, 0 insertions, 94 deletions
diff --git a/files/common/sbin/setup_router b/files/common/sbin/setup_router deleted file mode 100755 index 36b62e5..0000000 --- a/files/common/sbin/setup_router +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -echo "Soll dieser Router als Gateway arbeiten? (j/n) " -read router -echo -if [[ $router = "j" ]] - then - #Act a a Router - #set ipv4 Adress - echo "Bitte warten, es wird automatisch eine freie IP ermittelt (Kann bis zu 10 Minuten dauern)" - /etc/init.d/n2n enable - /etc/init.d/n2n start - sleep 20 - for i in `seq 1 254 `; do - LOSS=`ping -c3 10.17.$i.1 | grep loss | awk '{print $7}' | sed 's/%//g'; sleep 1` - sleep 1; - if [[ 99 -lt $LOSS ]]; then - NODE_IP=10.17.$i.1 - oct3=$i - break - fi - done - - uci set network.mesh.ipaddr=$NODE_IP - uci set network.mesh.proto=static - uci set network.mesh.netmask=255.255.0.0 - uci set dhcp.mesh=dhcp - uci set dhcp.mesh.start=2 - uci set dhcp.mesh.limit=254 - uci set dhcp.mesh.leasetime=12h - uci set dhcp.mesh.interface=mesh - uci set dhcp.mesh.start_ip=10.17.$oct3.2 - uci set dhcp.mesh.end_ip=10.17.$oct3.254 - uci commit dhcp - # Batman Server Mode - uci set batman-adv.bat0.gw_mode=server - uci commit batman-adv - # Add Cron Jobs - echo "* * * * * /sbin/test_gateway > /dev/null" >> /etc/crontabs/root - echo "* * * * * /sbin/splash_sync > /dev/null" >> /etc/crontabs/root - echo "*/15 * * * * /sbin/n2n_watchdog > /dev/null" >> /etc/crontabs/root - /etc/init.d/cron restart - echo $'\n\n\n\n' - echo "Einrichtung des Routers abgeschossen! -Dieser Router hat folgende IP: $NODE_IP" - echo $'\n\n\n\n' - else - # Act as a node only - uci del dhcp.mesh - uci commit dhcp - uci del network.mesh.ipaddr - uci del network.mesh.proto - uci del network.mesh.netmask - uci commit network - echo "Der Router wird als normaler Node konfiguriert" - echo - # Batman Client Mode - uci set batman-adv.bat0.gw_mode=client - uci commit batman-adv -fi -uci commit -/etc/init.d/batman-adv restart -#TODO: Generate Subnet -#TODO: DHCP Configuration -#HINT: Port freifunk-wizzard-leipzig in from lua (http://luci.subsignal.org/trac/browser/luci/branches/luci-0.10/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua) diff --git a/files/common/sbin/test_gateway b/files/common/sbin/test_gateway deleted file mode 100755 index 97296e2..0000000 --- a/files/common/sbin/test_gateway +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -TESTHOST=4.2.2.4 -ping -c 1 -w 5 $TESTHOST &>/dev/null - -if [ $? -ne 0 ] ; then - // IP not reachable -> try if-down-up - ifdown wan - ifup wan - sleep 10 - // Test Again - ping -c 1 -w 5 4.2.2.4 &>/dev/null - if [ $? -ne 0 ] ; then - ifdown wan - fi -fi diff --git a/files/common/sbin/test_vpn b/files/common/sbin/test_vpn deleted file mode 100755 index f69b5a7..0000000 --- a/files/common/sbin/test_vpn +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -TESTHOST=4.2.2.4 -ping -c 1 -w 5 -I tun0 $TESTHOST &>/dev/null - -if [ $? -ne 0 ] ; then - // IP not reachable -> restart openvpn - /etc/init.d/openvpn restart - sleep 10 - // Test Again - ping -c 1 -w 5 -I tun0 $TESTHOST &>/dev/null - if [ $? -ne 0 ] ; then - /etc/init.d/openvpn stop - ifdown wan - fi -fi |