thanks to vda

David Collier from_busybox_maillist at dexdyne.com
Mon Dec 6 12:55:00 UTC 2010


I ought to say that I already have most of this going - though it needs
thorough testing and the mutex question addressed maybe.

D




In article <memo.20101206110935.5056E at postmaster+dexdyne.com.cix.co.uk>,
from_busybox_maillist at dexdyne.com (David Collier) wrote:

> *From:* "David Collier" <from_busybox_maillist at dexdyne.com>
> *To:* busybox at busybox.net
> *Date:* Mon, 6 Dec 2010 11:09 +0000 (GMT Standard Time)
> 
> I thought I's explain why I'm blitzing this mailing list, or 
> apologise,
> whichever seems most appropriate :-)
> 
> I have read 
> 
> http://www.busybox.net/~vda/no_ifup.txt
> 
> and as it happens we do things close to the way it is recommended
> already!
> 
> That file hints at stuff which pretty much covers the scope of the 
> task I
> have set myself, which is:
> 
> optionally configure eth0 from dhcp, otherwise optionally run on
> user-fixed address or set interface quiescent. Run the dhcp forever 
> and
> correctly handle any future changes of details, or NAKs to renewals.
> 
> optionally run a PPP link over a gprs link, especially on units 
> with no
> land-line. Deal with all the wonderful stuff that happens on such a
> connection like "gprs unavailable" status.
> 
> optionally run a VPN, which should persistently use whatever route 
> it can
> grab to connect to a fixed server.
> 
> optionally run this lot in fail-over mode, so the WAN connection is 
> used
> when present, but the GPRS takes over if it isn't, provided a GPRS 
> link
> an be made. All the while monitoring the WAN, and switching back if 
> it
> reappears.
> 
> send SMS messages using the modem which runs GPRS, even if that has 
> only
> one port, so involves temporarily taking the GPRS link up and down. 
>  
> 
> ----------------------------------
> It brings up all sorts of interesting stuff like when you get a new 
> dhcp
> lease, you must implement ip and mask NOW, but only set DNS and 
> gateway
> if the current default route is over eth0, or that later becomes the
> default.
> 
> what I'm not doing properly is semaphoring the process of changing
> routing tables etc - so there will be moments when a new dhcp lease 
> DNS
> would get lost because the PPP s/w has just that moment decided it 
> has
> just got a connection.... that's a job for later, see below.
> 
> I'm also trying to set up 3 shepherd scripts which will notice, and 
> panic
> if any of the PPP, dhcp, or VPN processes dies, and re-launch them.
> 
> Plus logging every event that happens on dhcp, PPP and VPN so we can
> bug-hunt when it all goes belly-up in the real world.
> 
> Much of this is scripted, though there is a c proggie in the 
> background
> handing stuff like SMS sending.
> 
> ==============================================
> 
> There is a question here :-) -
> 
> Suppose I try to move on to a semaphore-locked system so that 
> changes to
> routine and ip address are mutexed and changes can't get lost... 
> what
> mechanism would people advise me to use?
> 
> Would you use flock on a key file? Or is there something better?
> 
> D
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
> 


More information about the busybox mailing list