X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=simple-cdd%2Fadditional_scripts%2Fconfigure_switch_bootstrap.tcl;fp=simple-cdd%2Fadditional_scripts%2Fconfigure_switch_bootstrap.tcl;h=0000000000000000000000000000000000000000;hb=7cf8d4b77c1be839986f26cbd946ba28ae6a464e;hp=db95d4d673f87fd5c731098ed8522737da277649;hpb=1a388d7d89aa3e2b3333b71829e02c68003c886b;p=debian6500.git diff --git a/simple-cdd/additional_scripts/configure_switch_bootstrap.tcl b/simple-cdd/additional_scripts/configure_switch_bootstrap.tcl deleted file mode 100755 index db95d4d..0000000 --- a/simple-cdd/additional_scripts/configure_switch_bootstrap.tcl +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set host [lrange $argv 0 0] -if { $host == "" } { - puts "usage: configure_switch_bootstrap.tcl \[sw1|sw2|swg1|swg2|swm\]" - exit 1 -} - -set ipaddress "" -if { $host == "swg1" } { set ipaddress "10.133.26.231" } -if { $host == "swg2" } { set ipaddress "10.133.26.232" } -if { $host == "swm" } { set ipaddress "10.133.28.231" } -if { $host == "sw1" } { set ipaddress "10.133.26.231" } -if { $host == "sw2" } { set ipaddress "10.133.26.232" } -if { $ipaddress == "" } { puts "unknown switch '$host'""; exit 1 } - -spawn screen -c . /dev/ttyUSB0 - -set timeout 5 - -set state 0 -while { $state != 1 } { - expect { - timeout { send "\r" } - -exact ">" { send "enable\r" } - "#" { set state 1 } - "Password:" { send "thales\r" } - eof { send_user "connection to host failed\n"; exit 1 } - } -} - -send "configure terminal\r" -expect "#" { send "interface vlan 1\r" } -expect "#" { send "ip address $ipaddress 255.255.255.0\r" } -expect "#" { send "exit\r" } -expect "#" { send "line vty 0 4\r" } -expect "#" { send "password thales\r" } -expect "#" { send "enable password thales\r" } -expect "#" { send "end\r" } - -# quit switch connection -expect "#" { send "exit\r" } - -# to quit screen we need to send C-a \. -send "\001\\" -expect "kill all your windows" { send "y\r" } - -exit 0 -# vim:set tabstop=4 expandtab shiftwidth=4: