[ LUGOS ] mail, redial, printer

Dragan Nedeljkovic Dragan.Nedeljkovic na usa.net
Sre Feb 25 20:34:27 CET 1998


strozi na mindless.com wrote:

> Racunalnik, gor Linux in par vprasanj.

> 2. Redial problem. Moja trenutna ppp-on skripta:
> pppd connect 'chat -f ~/pppscript' +ua ~/pap defaultroute 38400 /dev/modem
> & V pppscript imam kot prvi ABORT definiran BUSY, kot drugi pa NO CARRIER.
> Igral sem se nekaj z IF stavki, da bi se stvar, ce bi se koncala z rc 4
> vrnila nazaj in ponovno klicala ampak mi ni ravno uspelo. :(
> Kako imate to reseno vi? (kaksna skriptica ne bi bila odvec)

Tudi sam sem imel probleme s tem, moja resitev je taka:

Splosni napotki kako pripraviti ppp do tega da dela tudi pod linuxom
http://www.umr.edu/~mark/linux/ppp.html
http://www.umr.edu/~mark/linux/ppp1.html

Potem pa se dve skripti: pppon
--------------------------------------------------------------
#!/bin/bash
SLEEP=30s
while [ ! -e "/var/run/ppp0.pid" ]
do
 pppd
 sleep $SLEEP
done
echo "* * * PPP0 interface is up! * * *"
exit 0
--------------------------------------------------------------


in pppoff
--------------------------------------------------------------
#!/bin/sh

DEVICE=ppp0

#
# If the ppp0 pid file is present then the program is running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
 kill -INT `cat /var/run/$DEVICE.pid`
#
# If unsuccessful, ensure that the pid file is removed.
#
 if [ ! "$?" = "0" ]; then
  echo "removing stale $DEVICE pid file."
  rm -f /var/run/$DEVICE.pid
  exit 1
 fi
#
# Success. Terminate with proper status.
#
 echo "$DEVICE link terminated"
 exit 0
fi
#
# The link is not active
#
echo "$DEVICE link is not active"
exit 1
--------------------------------------------------------------

LP, Dragan




Dodatne informacije o seznamu Starilist