merge 64-bit fixes from Fernando Lucas Rodriguez <fernando_lr@terra.es>
[debian/gcpegg] / sample.pppscript
1 #!/bin/csh
2
3 if ("$1" == "up") then
4   echo "Bringing net up"
5
6   /usr/sbin/pppd connect '/usr/sbin/chat -v ABORT BUSY ABORT "NO CARRIER" "" ATZ OK ATS71=1 OK ATS80=1 OK ATDT4828060 CONNECT ""' /dev/cua0 115200 name halebopp remotename whitehole debug crtscts modem defaultroute 10.0.0.111:10.0.0.116
7
8   # Wait for connection success
9   set timer = 8
10   while ($timer > 0) 
11     if (-e "/var/run/ppp0.pid") exit 0
12     sleep 1
13     @ timer = $timer - 1
14   end
15
16   echo "Couldn't get it up!"
17   exit -1
18 endif
19
20 if ("$1" == "down") then
21   echo "Bringing net down"
22   if (! -e "/var/run/ppp0.pid") exit 0
23   set pid = `cat /var/run/ppp0.pid`
24   kill $pid
25
26   exit 0
27 endif
28
29 echo "Usage: pppscript up down"
30 exit 1