remove extention on some scripts and correct services
[debian6500.git] / master / opt / script / configure_switch.tcl
diff --git a/master/opt/script/configure_switch.tcl b/master/opt/script/configure_switch.tcl
deleted file mode 100755 (executable)
index 4d34d43..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/expect
-
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-# Author: Laurent Mazet
-# 
-# Script de configuration du switchs
-#
-# 2013-10-10 V1.0 : Creation
-#
-# ============================================================================
-
-set host [lrange $argv 0 0]
-if { $host == "" } {
-    puts "usage: configure_switch.tcl \[sw1|sw2|swg1|swg2|swm\]"
-    exit 1
-}
-
-set tftpserver ""
-if { $host == "swg1" } { set tftpserver "10.133.26.160" }
-if { $host == "swg2" } { set tftpserver "10.133.26.160" }
-if { $host == "swm" } { set tftpserver "10.133.28.160" }
-if { $host == "sw1" } { set tftpserver "10.133.26.160" }
-if { $host == "sw2" } { set tftpserver "10.133.26.160" }
-if { $tftpserver == "" } { puts "unknown switch '$host'"; exit }
-
-set date [ exec date +%Y%m%d-%H:%m:%S ]
-set backup "$host-$date.txt"
-
-spawn telnet $host
-
-set timeout 30
-
-expect {
-    "Password:" { send "thales\r" }
-    incorrect { send_user "invalid password or account\n"; exit 1 }
-    timeout { send_user "connection to $host timed out\n"; exit 1 }
-    eof { send_user "connection to host failed\n"; exit 1 }
-}
-expect -exact ">" { send "enable\r" }
-expect "Password:" { send "thales\r" }
-expect "#" { send "copy running-config tftp://$tftpserver/$backup\r" }
-expect -exact "?" { send "$tftpserver\r" }
-expect -exact "?" { send "$backup\r" }
-expect "#" { send "copy tftp://$tftpserver/$host.txt startup-config\r" }
-expect -exact "?" { send "startup-config\r" }
-#expect "#" { send_user " << reload or exit ? >> "; interact }
-expect "#" { send "reload\r" }
-
-exit 0
-# vim:set tabstop=4 expandtab shiftwidth=4: