diff options
| author | Darkeye <postfach@martinmichel.info> | 2011-01-21 18:17:07 (GMT) | 
|---|---|---|
| committer | Darkeye <postfach@martinmichel.info> | 2011-01-21 18:17:07 (GMT) | 
| commit | 2ade89a3e11d8a3d26319ae2f410fcc7b2c14e95 (patch) | |
| tree | 9b0154d902333229bc712e4790fb5d5ed450f6f9 /files/sbin/setup_router | |
| parent | 59bc16edec7f4532ba25118030619b72cc2438f7 (diff) | |
Add dhcp start_ip and end_ip function and add in setup_router
Diffstat (limited to 'files/sbin/setup_router')
| -rwxr-xr-x | files/sbin/setup_router | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/files/sbin/setup_router b/files/sbin/setup_router index b3b7ecd..84457a1 100755 --- a/files/sbin/setup_router +++ b/files/sbin/setup_router @@ -8,6 +8,11 @@ if [[ $router = "j" ]]  		#set ipv4 Adress  		echo "Bitte geben sie die IP-Adresse des Routers an (siehe http://www.freifunk-jena.de/NodeDB)"  		read ipv4_adress +		#IP Zerlegen +		oct1=`echo $ipv4_adress | awk -F . '{print $1}'` +		oct2=`echo $ipv4_adress | awk -F . '{print $2}'`  +		oct3=`echo $ipv4_adress | awk -F . '{print $3}'` +		oct4=`echo $ipv4_adress | awk -F . '{print $4}'`  		uci set network.mesh.ipaddr=$ipv4_adress  		uci set network.mesh.proto=static  		uci set network.mesh.netmask=255.255.0.0 @@ -16,6 +21,8 @@ if [[ $router = "j" ]]  		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  		batctl gw server  | 
