#!/bin/bash if [ $# != 2 ]; then echo No enought of parameters. Must be 3.; exit 1; fi if [ $1 = 1 ]; then my_login="diya"; my_passw="pass1"; fi if [ $1 = 2 ]; then my_login="diya_dva"; my_passw="pass2"; fi echo "TEST" echo `date "+%d.%m.20%y %H:%M:%S"` echo $1 /usr/sbin/chat -V \ ABORT "ERROR" \ ABORT "NO DIALTONE" \ TIMEOUT 5 \ "" "AT" \ "OK"-"+++"-"" "AT" \ "OK" "ATZ" \ "OK" "ATS7=60M1L1S6=4" \ ABORT "BUSY" \ ABORT "NO ANSWER" \ ABORT "NO CARRIER" \ ABORT "Login incorrect" \ "OK" "ATDP$2" \ TIMEOUT 40 \ "CONNECT" "" \ "ogin:" ${my_login} \ "assword:" "\\q${my_passw}" \ "$" "exec /usr/sbin/pppd" \ "}" "\\c" exit $?