#!/usr/bin/expect -- #exp_internal 1 set timeout 30 spawn telnet c1603 expect { "name: " {send "noc\r" expect "word: " {send "Passwd\r"}} } expect { "1603>" {send "enable\r" expect "word: " {send "Passwd\r"}} } expect { "1603#" {send "conf term\r" expect "config" {send "interface Dialer1\r" expect "config" {send "description ***** Dialer Interface to GTS Netcom Internet SMTP (08452030458) *****\r" expect "config" {send "no dialer string 08440416672\r" expect "config" {send "dialer string 08452030458\r" expect "config" {send "dialer load-threshold 240 either\r" expect "config" {send "ppp pap sent-username NetcomAccount password NetcomPasswd\r" expect "config" {send "ppp multilink\r" expect "config" {send "end\r" expect "1603#" {send "write\r" expect "1603#" {send "exit\r" }}}}}}}}}}}}} exit