Main Menu
My Other Sites
Contact Andrew Quinn
jaquinn@ihug.co.nz http://twitter.com/jaquinn| Ubuntu 8.1 - Network Configuration Change Script |
| Written by Administrator |
| Monday, 05 April 2010 07:54 |
|
Ubuntu 8.1 works really well as a build environment for OpenWRT and programming environment for the DSL502T. I have found that to make OpenWRT a network connection with Internet access is required but to program the DSL502T using adam2flash-502T.pl minimizing network traffic is important to prevent hangs during programming. Also all the DSL502T units I have seen use 192.168.1.1 as the IP address for programming... but my internal network using 10.x.x.x network addresses. So I needed a quick/easy way to switch between DHCP assignment of addresses for the internal network and STATIC assignment when programming. Directly editing /etc/network/interfaces and restarting the network services works but gets old fairly quickly.... instead I wrote the following setnet script which is called passing DHCP or STATIC as the parameter. It changes the network configuration and restarts the networking services. #!/bin/sh Probably no awards for great linux shell scripting but it works for me. |

