I've been playing with the OpenWRT Attitude Adjustment trunk on my TL-MR3020 lately, and since I'm modifying some of the included packages that get installed via feeds, I need to reflash the firmware a lot. And the problem here is that it's very time consuming. I'd like to optimize this process as much as possible, and the first optimization I can come up with is precluding any need for network reconfiguration after reflashing.
Currently, after I use
mtd to reflash my firmware, I have to log in via the serial console and modify
/etc/config/network to put the router on the right subnet, and to specify the gateway and dns. It sure would make a lot of sense if I could have this happen automatically every time.
I'm very new to Linux, so my first thought was to have a shell script run that edits
/etc/config/wireless/ and then does a
/etc/init.d/network restart to bring up the network interface(s). Then I thought that there must be a command-line equivalent to setting the gateway and dns, and then I could follow those commands up with
How would you all approach this problem? Am I on the right track?