X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=simple-cdd%2Fadditional_scripts%2Fconfigure_matrix.tcl;fp=simple-cdd%2Fadditional_scripts%2Fconfigure_matrix.tcl;h=0473f1517bb3099e065f4efb6fce6e3c8d67a4c8;hb=b3f3562f417f2983a7e0d0c2d5b54bb3bd9e94ab;hp=0000000000000000000000000000000000000000;hpb=40346f7c7585854238262f7b8ca4b5a0e5c5f0b4;p=debian6500.git diff --git a/simple-cdd/additional_scripts/configure_matrix.tcl b/simple-cdd/additional_scripts/configure_matrix.tcl new file mode 100755 index 0000000..0473f15 --- /dev/null +++ b/simple-cdd/additional_scripts/configure_matrix.tcl @@ -0,0 +1,41 @@ +#!/usr/bin/expect + +# ============================================================================ +# +# Copyright (C) THALES. All rights reserved +# +# * V1.0 Laurent Mazet 29/04/2013 +# creation script de configuration de la matrice par ligne de commande +# ============================================================================ + +set ipmaxtrix "10.133.28.253" + +spawn /opt/trc6500/tools/matrix_tool + +set timeout 3 + +exec ifconfig eth1:0 192.168.1.1 netmask 255.255.255.0 + +proc cleanexit {rc} { + exec ifconfig eth1:0 down + exit $rc +} + +expect { + "taper la commande choisie" { send "0\r" } + timeout { send_user "connection to $host timed out\n"; cleanexit 1 } + eof { send_user "connection to host failed\n"; cleanexit 1 } +} +expect { + "timeout detected" { send_user "can't connect on defaut ip\n"; cleanexit 1 } + "taper la commande choisie" { send "10\r" } +} + +expect "nouvelle adresse" { send "010.133.028.253\r" } + +expect "taper la commande choisie" { send "12\r" } + +expect "taper la commande choisie" { send "14\r" } + +cleanexit 0 +# vim:set tabstop=4 expandtab shiftwidth=4: