Показать сообщение отдельно
Старый 21.10.2013, 16:14   #7
gexa2008
Пользователь
 
Регистрация: 15.08.2008
Ресивер: Amiko 8900, openbox X800,810,620
Адрес: Украина Луганская обл.
Сообщений: 45
Сказал(а) спасибо: 17
Поблагодарили 14 раз(а) в 6 сообщениях
Вес репутации: 17
gexa2008 пока неопределено
По умолчанию

Цитата:
Сообщение от gexa2008 Посмотреть сообщение
Нет ничего неставил было в пршивке
значит ваш модем в системе виден!осталось скрипты запуска ppp подправить
Нет ничего неставил было в пршивке
1)ppp-dial-modem:
0:
chat -v \
ABORT "BUSY" \
ABORT "ERROR" \
'' AT \
"OK" "ATZ" \
"OK" "AT&D0&S0&R1" \
"OK" "AT&K0" \
"OK" ATDT$TELEPHONE \
TIMEOUT 30 \
sername: $ACCOUNT \
assword: $PASSWORD

2)ppp-off-modem:
0:
#!/bin/sh
################################################## ####################
#
# Determine the device to be terminated.
#
if [ "$1" = "" ]; then
DEVICE=ppp0
else
DEVICE=$1
fi

################################################## ####################
#
# If the ppp0 pid file is present then the program is running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
kill `cat /var/run/$DEVICE.pid`
#
# If the kill did not work then there is no process running for this
# pid. It may also mean that the lock file will be left. You may wish
# to delete the lock file at the same time.
if [ ! "$?" = "0" ]; then
rm -f /var/run/$DEVICE.pid
echo "ERROR: Removed stale pid file"
exit 1
fi
#
# Success. Let pppd clean up its own junk.
echo "PPP link to $DEVICE terminated."
exit 0
fi
#
# The ppp process is not running for ppp0
echo "ERROR: PPP link is not active on $DEVICE"
exit 1

3)ppp-on-modem:
0:
#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command. However, it is simple.
#
# These are the parameters. Change as needed.
if [ $# -ne 3 ]; then
echo "---------err1---------"
echo "should have three params: 1:telephone 2:account 3assword "
exit 1
fi

TELEPHONE=$1 # The telephone number for the connection
ACCOUNT=$2 # The account name for logon (as in 'George Burns')
PASSWORD=$3 # The password for this account (and 'Gracie Allen')
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
#
#echo $TELEPHONE
#echo $ACCOUNT
#echo $PASSWORD




/etc/ppp/pppd debug lock nocrtscts /dev/ttyAS1 115200 \
kdebug 4 0.0.0.0:0.0.0.0 noipdefault netmask 255.255.255.0 defaultroute connect /etc/ppp/ppp-dial-modem

con_cnt=0

while [ $con_cnt -lt 12 ]
do
dial_ok=`ifconfig|grep -w "ppp0"|awk '{print $1}'`
# echo "---dialing $TELEPHONE---"
if [ -z $dial_ok ]
then
let "con_cnt+=1"
sleep 10
else
# echo "modem dial success!"
break
fi
done

if [ $con_cnt -ge 6 ]
then
# echo "modem dial failed"
exit 1
fi

что имено надо править.
gexa2008 вне форума   Ответить с цитированием