blob: 460922bb7627ea9207fcb983f9b55ee917dc3eba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/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
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 commit dhcp
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
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)
|