[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Modem



michael loeffler <mi.lo@gmx.net> writes:

> Woran das genau liegt -> keine ahnung
> nehm aber an daß es am modem liegt, denn das alte creatix modem daß
> ich hier noch hab, hat das noch nie gemacht.

Das ist typisch für Elsa Modems. So gut sie sonst sind, sind sie etwas
lahm bei der Initialisierung und werden manchmal überrannt.
Das habe ich mit meinem 56k Pro aber auch schon vor Jahren mit meinem
28.8TQV gehabt.

> pon und poff sind nur kleine skripte zur verminderung der tastaturabnutzung
> und zur förderung der tipfaulheit aber trotzdem sehr nützlich :-)
> Gucks dir mal an:
> less `which pon`
> less `which poff`

Jepp.
 
> > Von Suse war ich ja vorher "wvdial" gewohnt, wobei ich sagen muß,

Ich habe mich schon immer gefragt, wofür man wvdial braucht, wenn doch
simple chatscripts seit Ewigkeiten für jede Gelegenheit reichen. Der
Komfort dabei wird nur durch die verwendeten Skripte beschränkt und
ist beliebig erweiterbar.

> Und wenn man mal guckt was es wirklich macht, und wie simpel das ist was
> es macht, versteht man auch viel eher wie es funktioniert.

Man kann auch schön damit weiterbasteln.

Das hier ist z.B. eine nette automatische Wahlwiederholung, die Ihr
vielleicht gebrauchen könnt (als redial speichern und mit "redial"
oder "redial providername" aufrufen):

--------------------------------------------
#!/bin/sh

PATH=/sbin:/bin:/usr/bin
export PATH

# Get the PIDs of all the pppds running.  Could also get these from
# /var/run, but pppd doesn't create .pid files until ppp is up.
# Yes, .45 straight in the foot.

LIMIT=10
LOCKDIR=/var/lock
DEVICE=ttyS1

if [ "$1" = "" ]; then
        PROVIDER=provider
else
        PROVIDER=$1
fi

PPPUP="pon $PROVIDER"
PPDOWN="poff $PROVIDER"


# ----- our little redailer -----
# make sure the device is not in use
if [ -f $LOCKDIR/LCK..$DEVICE ]
then
	echo "ppp-device is locked"
    	exit 1
fi

i=0
while [ 1 ]; do
	$PPPUP
	# waiting for connection to come up
	sleep 5
	while ( ! [ -f /var/run/ppp*.pid ] && [ `pidof pppd|wc -w` -gt 0 ] ); do
		echo "waiting"
		sleep 2
	done
		
	if [ -f /var/run/ppp*.pid ]; then
		# we are connected now
		echo "Connected..."
		j=0
		while [ $j -lt 4 ]; do
			# test if ppp0 is alive
			x=$(ifconfig | grep ppp. | wc -l)
			if [ $x -ne 0 ]; then
				# feedback for the user
				echo "ppp is up!"
				ifconfig | grep ppp. -A 1
				break 2 # exit from both loops
			fi
		sleep 5
		j=$[j+1]
		done
		echo "Arrgl -- no functioning ppp-connection!"
	else
		echo "no connect (busy?)"
	fi
	# don't try forever
	i=$[i+1]
	if [ $i -ge $LIMIT ]; then
		echo "still no ppp after $LIMIT tries, giving up"
		$PPPDOWN # just to make sure
		exit 1
	fi
	echo "I'll try again soon ..."
	$PPPDOWN # just to make sure
	sleep 10
done
----------------------------------------


cu,

marcus

-- 
            The dark ages were caused by the Y1K problem.
eMail: bofh@bogomips.de

-- 
-----------------------------------------------------------
Um sich aus der Liste auszutragen schicken Sie bitte eine
E-Mail an debian-user-de-request@lehmanns.de die im Subject
"unsubscribe <deine_email_adresse>" enthaelt.
Bei Problemen bitte eine Mail an: Jan.Otto@Lehmanns.de
-----------------------------------------------------------

794 eingetragene Mitglieder in dieser Liste.


Reply to: