#!/usr/local/bin/expect -f # configure_batch3.tcl - Expect script to configure 3rd batch of IP04s # # assumes /etc/minirc/.dfl on RS232 machine has 115200 as default baud rate #exp_internal 1 set rs232 dragonballz set send_slow {1 0.2} set timeout -1 # connect to machine with RS232 port spawn ssh $rs232 expect "$ " send "killall -9 minicom\r" expect "$ " send "minicom\r" # install native prompts expect "root:~> " send -s "install_asterisk_native_sounds.sh\r" expect "root:~> " send -s "ifconfig eth0 192.168.1.30\r" expect "root:~> " # todo - make host install scripts, and change IP...... # install conf files on target spawn bash expect "$ " send "./install_30.sh\r" expect "$ " close