simplify trc6500-master-file packaging
[debian6500.git] / master / opt / script / configure_matrix.tcl
CommitLineData
b3f3562f
OL
1#!/usr/bin/expect
2
3# ============================================================================
4#
5# Copyright (C) THALES. All rights reserved
6#
7# * V1.0 Laurent Mazet 29/04/2013
8# creation script de configuration de la matrice par ligne de commande
9# ============================================================================
10
b3f3562f
OL
11spawn /opt/trc6500/tools/matrix_tool
12
13set timeout 3
14
15exec ifconfig eth1:0 192.168.1.1 netmask 255.255.255.0
16
17proc cleanexit {rc} {
18 exec ifconfig eth1:0 down
19 exit $rc
20}
21
22expect {
23 "taper la commande choisie" { send "0\r" }
24 timeout { send_user "connection to $host timed out\n"; cleanexit 1 }
25 eof { send_user "connection to host failed\n"; cleanexit 1 }
26}
27expect {
28 "timeout detected" { send_user "can't connect on defaut ip\n"; cleanexit 1 }
29 "taper la commande choisie" { send "10\r" }
30}
31
8a1c6cff 32expect "nouvelle adresse" { send "010.133.026.253\r" }
b3f3562f
OL
33
34expect "taper la commande choisie" { send "12\r" }
35
36expect "taper la commande choisie" { send "14\r" }
37
38cleanexit 0
39# vim:set tabstop=4 expandtab shiftwidth=4: