New Zealand ADSL Mailing List


(OT) Re: Realm Change Script for Alcatel Speed Touch Home

From: James Hook <adsl.hook_at_bbanter.darktech.org>
Date: Thu, 3 Jan 2002 19:24:18 +1300 (NZDT)
Message-ID: <Pine.LNX.4.21.0201031912500.11796-100000@hooksoft>

G'Day,

On Sun, 30 Dec 2001, Mark Carey wrote:

> Anyway there is one thing I would like to fix, I need to find a bash command
> to wait for a period of time between the line,
> /usr/sbin/pptp 192.168.1.250
> and the bringing up of iptables any suggestions?
try 'sleep <period>' eg. sleep 1 to wait 1 second....
although you may want to combine it with a while loop so that it checks
every second if the link is back up, when it is it exists (while
<condition>; do <commands>; done)

alothough my attempts with pppd/pptp just use the /etc/ppp/ip-up.d
directory. I use that and the while loop in my script as I check to make
sure the modem exists using 'ping 10.0.0.138 -c 1' if its not beeps using
echo ^G>/dev/console and then sleeps 1 seconds and checks again.

while [ "'ping 10.0.0.138 -c 1|wc -l'" == 4 ]; do
  echo ^G>/dev/console
  sleep 1
done

> Any general critquing would also be greatly appreciated.
Hope that helps.

Cheereo,

-- 
                  \\\
                8(o o)8
-------------ooO--(_)--Ooo-------------
 .-`~`-. | James Hook
 H O O K | Hook@bbanter.darktech.org
 ~-._.-~ | http://hooksoft.8m.com
-------------ooO-------Ooo-------------
... Im going to live forever or die trying
-- 
This message is part of the NZ ADSL mailing list. 
see http://unixathome.org/adsl/ for archives, FAQ, 
and various documents. 
To unsubscribe: send mail to majordomo@lists.unixathome.org 
with "unsubscribe adsl" in the body of the message 
 
Received on Thu Jan 3 19:24:59 2002

This archive was generated by hypermail 2.2.0 : Thu Nov 30 11:48:20 2006 EST