[plug] Linux support for schools

Mike Holland myk at golden.wattle.id.au
Tue Sep 5 00:03:06 WST 2000


On Mon, 4 Sep 2000, Shackleton, Kevin wrote:

> 2) it copes with power failures.  We often have power failures longer than
> small UPS' will cope with.  Assuming the machine fsck's ok, it would be nice
> to see it work out if it should reconnect or not.

/etc/rc.d/rc.local is the place to add start-up code. e.g. something like

  hour=`date +%H`
  if [ ($hour -lt 18) -a ($hour -ge 6) ] then ppp-on; 

You can run the ppp-on and ppp-off scripts from cron, but see the
'persist' and 'holdoff' options for pppd, as you will want it to re-dial
when the link is lost. (just not too often!)

Mind you, all this doesnt smell right. The phrase "race conditions" comes
to mind. You could add some checks, but can anyone suggest a neater
solution for keeping a PPP link within certain hours, across reboots ?

-- 
Mike Holland  <mike at golden.wattle.id.au>
                          --==--





More information about the plug mailing list