From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id E9AFA201757 for ; Thu, 9 Feb 2012 18:32:59 -0800 (PST) Received: by werb14 with SMTP id b14so2776042wer.16 for ; Thu, 09 Feb 2012 18:32:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=R72KpyoPN3ioUr/sqZ5SpkRFjSjQwGlOn44Ao8BFb/Q=; b=LZ5prQd07oZBTxrlNfkkPADIWko1FRz4xupuI0BJn0uLTCleo2cUjYPZhwD1xcQXr1 loOf6rafCh6HCnSSFydBODnpPIHS7bfzcIXPV+ebOK5OUZzUCdT7cH7OwnoVeYh3I2J7 yugEHvvl/45xgC6GMdm0kRjs5dYy1BTsJSwog= MIME-Version: 1.0 Received: by 10.216.135.210 with SMTP id u60mr53781wei.37.1328841177816; Thu, 09 Feb 2012 18:32:57 -0800 (PST) Received: by 10.223.72.1 with HTTP; Thu, 9 Feb 2012 18:32:57 -0800 (PST) In-Reply-To: <0D836AD4-C37B-4ADD-BF98-6A9E913583C0@intermapper.com> References: <0D836AD4-C37B-4ADD-BF98-6A9E913583C0@intermapper.com> Date: Fri, 10 Feb 2012 03:32:57 +0100 Message-ID: From: Dave Taht To: Richard Brown Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "cerowrt-devel@lists.bufferbloat.net" Subject: Re: [Cerowrt-devel] Scripting CeroWrt config X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 02:33:00 -0000 On Thu, Feb 9, 2012 at 11:25 PM, Richard Brown wrote: > Folks, > > I make a number of changes to the router each time I install new firmware= . Specifically: > > - I install the snmpd and fprobe packages > - I start and enable snmpd > - I configure fprobe to send data to my InterMapper server for monitoring= , and add that command to the startup script > - At some point, I may want to change from 172.30.42.x addresses to my "n= ormal" network address range (192.168.2.x). I have a similar need to script things better. The uci interface can be quite cool. I would suggest playing with that. example: uci show network There is decent doc on that on the openwrt web site. > > What's the best way to script this? #!/bin/sh opkg update opkg install snmpd fprobe sed -i s/172.30.42/192.168.2/g /etc/config/* /etc/babeld.conf (etc - the full string is on the wiki) # etc, etc # and wip for me... opkg install ipv6policy net=3D`generate-rfc4193-addr se00` parse_network_somehow get a string of useful networks uci set network.se00.ip6addr=3Dwhatever/64 uci set network.sw00.ip6addr=3Dwhatever/64 stick in dns somehow etc. the ash shell is quite limited so I'd suggest developing your script on the box. >I'm quite content to paste in a set of commands over ssh, but wonder if th= ere's another way... (Would save/restore do all this?) I'm not, and I agree, this gets very tedious after a while. I'm very glad I use a routing protocol, because keeping bloatlab #1 operational without it is nearly impossible. (as it is, I reflash one box, wait for it to appear anew, change everything, reboot it, do another one) and for all that I've 'lost' 2 of the 8 boxes on that network (in california) and don't know which ones they are!! save/restore is unlikely to be a good idea at this point. Too much stuff changing. What I do for my much more complex configurations (includes ipv6 and I'd like very much to make it more generic) i snarf a copy of the default config via scp to my main machine check all that in git make the 'perfect' configuration check all those changes into git build a new box snarf it do diffs... I'm also working on a generic set of testbed tools for creating ipv6 ula addresses and getting them into dns. > > Thanks! > > Rich > _______________________________________________ > Cerowrt-devel mailing list > Cerowrt-devel@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/cerowrt-devel --=20 Dave T=E4ht SKYPE: davetaht US Tel: 1-239-829-5608 FR Tel: 0638645374 http://www.bufferbloat.net