summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkeye <postfach@martinmichel.info>2011-01-19 01:17:32 (GMT)
committerDarkeye <postfach@martinmichel.info>2011-01-19 01:17:32 (GMT)
commita7e2df8b29b707392418ca858df529b5f56b6046 (patch)
tree8b953056ce3ac6707334a109fca7af185cbcb241
parent60f0b33c99550b4cc0d76399478d291fafb76e81 (diff)
first version of setup_router tool
mode 1: gateway add ipv4 adress to br-mesh mode 2: default node
-rwxr-xr-xfiles/sbin/setup_router26
1 files changed, 26 insertions, 0 deletions
diff --git a/files/sbin/setup_router b/files/sbin/setup_router
new file mode 100755
index 0000000..ed35dd5
--- /dev/null
+++ b/files/sbin/setup_router
@@ -0,0 +1,26 @@
+#!/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 geben sie die IP-Adresse des Routers an (siehe http://www.freifunk-jena.de/NodeDB)"
+ read ipv4_adress
+ uci set network.mesh.ipaddr=$ipv4_adress
+ uci set network.mesh.proto=static
+ uci set network.mesh.netmask=255.255.0.0
+ else
+ # Act as a node only
+ uci del network.mesh.ipaddr
+ uci del network.mesh.proto
+ uci del network.mesh.netmask
+ echo "Der Router wird als normaler Node konfiguriert"
+ echo
+
+fi
+uci commit
+#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)
contact: Jan Huwald // Impressum