|
12 | 12 | # Un-buffer output
|
13 | 13 | $| = 1;
|
14 | 14 |
|
| 15 | +# use lib prepends to @INC, so put lower priority first |
| 16 | +# This is before run-time, so cannot condition this with normal 'if' logic. |
| 17 | +use lib '/home/lanforge/scripts'; |
| 18 | +use lib "./"; |
| 19 | + |
15 | 20 | use LANforge::Endpoint;
|
16 | 21 | use LANforge::Port;
|
17 | 22 | use LANforge::Utils;
|
|
26 | 31 |
|
27 | 32 | # This sets up connections between 2 LANforge machines
|
28 | 33 | my $lf1 = 1;
|
29 |
| -my $lf2 = 4; |
| 34 | +my $lf2 = 2; |
30 | 35 |
|
31 | 36 | # Port pairs. These are the ports that should be talking to each other.
|
32 | 37 | # Ie, the third column in lf1_ports talks to the third column in lf2_ports.
|
33 |
| -my @lf1_ports = (4, 5, 2); # ,7); |
34 |
| -my @lf2_ports = (5, 6, 4); # ,5); |
| 38 | +my @lf1_ports = ("wlan0"); |
| 39 | +my @lf2_ports = ("vap0000"); |
35 | 40 |
|
36 |
| -my $ports_are_connected = 1; # Connected to each other. If true, we can test some |
| 41 | +my $ports_are_connected = 0; # Connected to each other. If true, we can test some |
37 | 42 | # ethernet driver settings more precisely.
|
38 | 43 |
|
39 | 44 | my $manual_check = 0; # If this is true, then user input will be asked for each time
|
|
75 | 80 |
|
76 | 81 | my $fail_msg = "";
|
77 | 82 |
|
78 |
| -# Open connection to the LANforge server. |
79 |
| - |
80 |
| -my $t = new Net::Telnet(Prompt => '/default\@btbits\>\>/'); |
81 |
| - |
82 |
| - |
83 |
| -$t->open(Host => $lfmgr_host, |
84 |
| - Port => $lfmgr_port, |
85 |
| - Timeout => 10); |
86 |
| - |
87 |
| -$t->waitfor("/btbits\>\>/"); |
88 |
| - |
89 | 83 | # Configure our utils.
|
90 |
| -my $utils = new LANforge::Utils(); |
91 |
| -$utils->telnet($t); # Set our telnet object. |
| 84 | +our $utils = new LANforge::Utils(); |
| 85 | +$::utils->connect($lfmgr_host, $lfmgr_port); |
92 | 86 | $utils->cli_send_silent(0); # Do show input to CLI
|
93 | 87 | $utils->cli_rcv_silent(0); # Repress output from CLI ??
|
94 | 88 |
|
|
0 commit comments