mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-30 18:27:53 +00:00
updates library pathing, using telnet
This commit is contained in:
@@ -9,6 +9,7 @@ use diagnostics;
|
|||||||
use Carp;
|
use Carp;
|
||||||
$SIG{__DIE__} = sub{Carp::confess(@_)};
|
$SIG{__DIE__} = sub{Carp::confess(@_)};
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
use lib '/home/lanforge/scripts';
|
||||||
use Net::Telnet;
|
use Net::Telnet;
|
||||||
use Time::HiRes qw(usleep);
|
use Time::HiRes qw(usleep);
|
||||||
use LANforge::Utils;
|
use LANforge::Utils;
|
||||||
|
|||||||
@@ -13,12 +13,10 @@ use strict;
|
|||||||
# Un-buffer output
|
# Un-buffer output
|
||||||
$| = 1;
|
$| = 1;
|
||||||
|
|
||||||
|
use lib '/home/lanforge/scripts';
|
||||||
use LANforge::Utils;
|
use LANforge::Utils;
|
||||||
|
|
||||||
use Net::Telnet ();
|
use Net::Telnet ();
|
||||||
|
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
||||||
my $shelf_num = 1;
|
my $shelf_num = 1;
|
||||||
|
|
||||||
# Default values for ye ole cmd-line args.
|
# Default values for ye ole cmd-line args.
|
||||||
@@ -101,19 +99,9 @@ if ($action eq "set_atten") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Open connection to the LANforge server.
|
# Open connection to the LANforge server.
|
||||||
|
|
||||||
my $t = new Net::Telnet(Prompt => '/default\@btbits\>\>/',
|
|
||||||
Timeout => 20);
|
|
||||||
|
|
||||||
$t->open(Host => $lfmgr_host,
|
|
||||||
Port => $lfmgr_port,
|
|
||||||
Timeout => 10);
|
|
||||||
|
|
||||||
$t->waitfor("/btbits\>\>/");
|
|
||||||
|
|
||||||
# Configure our utils.
|
# Configure our utils.
|
||||||
my $utils = new LANforge::Utils();
|
my $utils = new LANforge::Utils();
|
||||||
$utils->telnet($t); # Set our telnet object.
|
$utils->connect($lfmgr_host, $lfmgr_port);
|
||||||
if ($quiet eq "yes") {
|
if ($quiet eq "yes") {
|
||||||
$utils->cli_send_silent(1); # Do show input to CLI
|
$utils->cli_send_silent(1); # Do show input to CLI
|
||||||
$utils->cli_rcv_silent(1); # Repress output from CLI ??
|
$utils->cli_rcv_silent(1); # Repress output from CLI ??
|
||||||
|
|||||||
Reference in New Issue
Block a user