[ LUGOS ] pppsetup

cRaZYp crazyp na slo.net
Pet Apr 25 12:36:34 CEST 1997


Anze Vidmar wrote:
> 
> On Thu, 24 Apr 1997, cRaZYp wrote:
> 
> > Anze Vidmar wrote:
> > >
> > > cav,
> > >
> > > a je kdo seynanjem s programcicem "pppsetup"???
> > >
> > > Anze.
> > >
> >
> > Ehm. Jez sem s tem prsu na net. Ni se mi dal ukvarjat nastavitvami +
> > takrat se nisem tok obvladu. Tud zdej (ko na novo instaleram system)
> > uporabm pppsetup. V cem je problem? Stvarca deluje sist kool. Dej raj
> > povej, kwa ti nagaja.
> >
> > Pero.
> 
> Problem se pojavi takoj ko pozenem pppsetup. Neki zabluzi, nakar mi rece:
>  PPP configuration cancelled.
>  No phone number.
> 
> Ce bi potekal tako kot more bi me morau program sprasevat neke podatke. Se
> predno pride do prvega mi javi to napako.
> Drugac instalacije je potekala kot se spodobi...
> Any ideas?
> 
> Anze.
> 
> ------------------------------
> Don't Fear the Pinguins.
> 

Ehm. Strange. Mozn da mas kaksno novejso verzijo... jez zmer uporabm eno
staro (vsaj po moje je stara...), ti jo bom dal zraven... Aja... ce ti
bo ratal: vpis phone brez - (crtice), pa ko te vprasa za nameserver,
vpis kar ene par stevilk (recimo arnes ma 2 al 3. kr eno za drugim, loci
jih pa s presledkom.).

Pero.
#!/bin/sh
###############################################################################
#
#	PPPSETUP  --  Script to set up pppd
###############################################################################

echo
echo "PPPSETUP"
echo 
echo "You have to be root to run this procedure"
echo
echo "answer all that apply and leave blank what does"
echo "not apply....leave blank by hitting [enter]"
echo "					press [enter]"
read x
clear

#if [ ! `whoami` = "root" ]; then
#	echo "You must be root to run this script."
#	exit 1
#fi

while [ -z "$PHONENUM" ]
do
	echo
	echo "To begin setting up your PPP connection, I need to know a "
	echo "few things.  For starters, what is the phone number of your"
	echo "Internet service provider?"
	echo
	echo "(Note: in the USA, use *70, [comma required!] to turn off call"
	echo " waiting.)"
	echo
	echo -n "Phone number : "
	read PHONENUM
	if [ -z "$PHONENUM" ]; then
		echo "You must enter a phone number!  :)"
		sleep 1
	fi
done

if [ -e "/dev/modem" ]; then
	echo
	echo -n "Found your modem...("
	echo -n `ls -l /dev/modem | cut -b56-80`
	echo ")"
	echo
	DEVICE="/dev/modem"
else
	while [ -z "$DEVICE" ]
	do
		echo
		echo "Secondly, what is the name of your modem device?"
		echo
		echo "	1) /dev/cua0  (COM1: under DOS)"
		echo "	2) /dev/cua1  (COM2: under DOS)"
		echo "	3) /dev/cua2  (COM3: under DOS)"
		echo "	4) /dev/cua3  (COM4: under DOS)"
		echo
		echo -n "Select device : "
		read devnum

		case $devnum in
			1)
				DEVICE="/dev/cua0"
				;;
			2)
				DEVICE="/dev/cua1"
				;;
			3)
				DEVICE="/dev/cua2"
				;;
			4)
				DEVICE="/dev/cua3"
				;;
			*)
				echo "Sorry, $devnum isn't a legal selection."
				;;
		esac
	done
fi

while [ -z $BAUDRATE ]
do
	echo
	echo "What baud rate is your modem?"
	echo
	echo "   0)115200    (Yeeeee-HAW!!!           )"
	echo "   1) 38400    (Hangin' ten on the 'net!)"
	echo "   2) 19200    (Better known as 14.4    )"
	echo "   3)  9600    (Kinda pokey, ain'tcha?  )"
	echo "   4)  2400    (God help you.  :>       )"
	echo
	echo -n "Baud rate : "
	read baudnum

	case $baudnum in
		0)
			BAUDRATE="115200"
			;;
		1)
			BAUDRATE="38400"
			;;
		2)
			BAUDRATE="19200"
			;;
		3)
			BAUDRATE="9600"
			;;
		4)
			BAUDRATE="2400"
			;;
		*)
			echo "Sorry, $baudnum isn't a legal selection."
			sleep 1
			;;
	esac
done

echo
echo "What is the IP address of your Internet provider's nameserver?"
echo
echo "Note: Your service provider's technical support can provide you"
echo "with this information."
echo
echo -n "Nameserver IP : "
read DNSIP

echo >> /etc/resolv.conf
echo "nameserver $DNSIP" >> /etc/resolv.conf

OLDDIR=`pwd`
cd $HOME

echo
echo "Now comes the tough part.  :)  I need to know what your"
echo "dialup system prints to your screen, and I need to know what"
echo "you respond with."
echo
echo "( End with '***')"
echo
echo "ABORT BUSY ABORT 'NO CARRIER' '' ATDT$PHONENUM" > .pppscript
while [ ! "$MESSAGE" = "***" -a ! "$YOUSAY" = "***" ]
do
	echo -n "Dialup server says : "
	read MESSAGE

	if [ "$MESSAGE" = "***" ]; then
		continue
	fi

	echo -n "    ...and you say : "
	read YOUSAY

	if [ "$YOUSAY" = "***" ]; then
		continue
	fi

	echo "$MESSAGE $YOUSAY" >> .pppscript
done

rm -f ppp-go
echo "#!/bin/sh" > ppp-go
echo "/usr/sbin/pppd connect '/usr/sbin/chat -f $HOME/.pppscript' defaultroute $BAUDRATE $DEVICE &" >> ppp-go
chmod 755 ppp-go

cd $OLDDIR
echo
echo "To connect to your remote system, cd to your home directory ($HOME), and type:"
echo "./ppp-go"
echo
echo "Then wait 2 minutes or so.  You should be able to use your Internet applications"
echo "without a problem.  (Hopefully. ;)"
echo
echo "You should only have to run this procedure ounce unless something changes"
echo "with your provider or personal setup. To start PPP from here on out just"
echo "type from your home dir ppp-go"
echo 
echo "If your pppd and chat bins reside someplace other than"
echo "/usr/sbin then you will need to edit the ppp-go and .pppscript"
echo "files to reflect the location, usually /usr/lib/ppp for older"
echo "distributions like Slackware-2.*"
echo 
echo "I can be reached via email at wingman na infohwy.com "
echo "or in the #linux channel on IRC with the nick WingMan"





Dodatne informacije o seznamu Starilist